aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 31d6874..ca1c8a4 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -6466,7 +6466,7 @@ reshape_init_r (tree type, reshape_iter *d, tree first_initializer_p,
non-empty subaggregate, brace elision is assumed and the
initializer is considered for the initialization of the first
member of the subaggregate. */
- if (TREE_CODE (init) != CONSTRUCTOR
+ if ((TREE_CODE (init) != CONSTRUCTOR || COMPOUND_LITERAL_P (init))
/* But don't try this for the first initializer, since that would be
looking through the outermost braces; A a2 = { a1 }; is not a
valid aggregate initialization. */