aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/init.c')
-rw-r--r--gcc/cp/init.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index 54b8a08..dbdd866 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -1271,11 +1271,10 @@ expand_aggr_init_1 (tree binfo, tree true_exp, tree exp, tree init, int flags)
as TARGET_EXPRs. */
if (init && TREE_CODE (exp) == VAR_DECL
- && TREE_CODE (init) == CONSTRUCTOR
- && TREE_HAS_CONSTRUCTOR (init))
+ && COMPOUND_LITERAL_P (init))
{
/* If store_init_value returns NULL_TREE, the INIT has been
- record in the DECL_INITIAL for EXP. That means there's
+ recorded as the DECL_INITIAL for EXP. That means there's
nothing more we have to do. */
init = store_init_value (exp, init);
if (init)