re PR c++/64314 (ICE in record_reference, at cgraphbuild.c:87)

PR c++/64314
	PR c++/57510
	* typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
	that has been completely split out.

From-SVN: r220047
This commit is contained in:
Jason Merrill 2015-01-23 11:30:00 -05:00 committed by Jason Merrill
parent c6e7c499a3
commit fa4e8db234
3 changed files with 15 additions and 0 deletions

View File

@ -1,5 +1,10 @@
2015-01-23 Jason Merrill <jason@redhat.com>
PR c++/64314
PR c++/57510
* typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
that has been completely split out.
PR c++/64701
* constexpr.c (maybe_constant_value): Just hand back STATEMENT_LIST.

View File

@ -653,6 +653,8 @@ split_nonconstant_init_1 (tree dest, tree init)
if (!split_nonconstant_init_1 (sub, value))
complete_p = false;
else
CONSTRUCTOR_ELTS (init)->ordered_remove (idx--);
num_split_elts++;
}
else if (!initializer_constant_valid_p (value, inner_type))

View File

@ -0,0 +1,8 @@
// PR c++/64314
// { dg-do compile { target c++11 } }
struct C { C(); ~C(); };
struct A {
int i;
C c[1];
} a {};