Commit fa4e8db2 by Jason Merrill Committed by Jason Merrill

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
parent c6e7c499
2015-01-23 Jason Merrill <jason@redhat.com> 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 PR c++/64701
* constexpr.c (maybe_constant_value): Just hand back STATEMENT_LIST. * constexpr.c (maybe_constant_value): Just hand back STATEMENT_LIST.
......
...@@ -653,6 +653,8 @@ split_nonconstant_init_1 (tree dest, tree init) ...@@ -653,6 +653,8 @@ split_nonconstant_init_1 (tree dest, tree init)
if (!split_nonconstant_init_1 (sub, value)) if (!split_nonconstant_init_1 (sub, value))
complete_p = false; complete_p = false;
else
CONSTRUCTOR_ELTS (init)->ordered_remove (idx--);
num_split_elts++; num_split_elts++;
} }
else if (!initializer_constant_valid_p (value, inner_type)) else if (!initializer_constant_valid_p (value, inner_type))
......
// PR c++/64314
// { dg-do compile { target c++11 } }
struct C { C(); ~C(); };
struct A {
int i;
C c[1];
} a {};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment