diff options
Diffstat (limited to 'gcc/cp/typeck2.c')
-rw-r--r-- | gcc/cp/typeck2.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c index f11dbe19850..780c3e7abe4 100644 --- a/gcc/cp/typeck2.c +++ b/gcc/cp/typeck2.c @@ -348,9 +348,11 @@ split_nonconstant_init_1 (tree dest, tree init, tree *pcode) case VECTOR_TYPE: if (!initializer_constant_valid_p (init, type)) { + tree cons = copy_node (init); CONSTRUCTOR_ELTS (init) = NULL; - code = build (MODIFY_EXPR, type, dest, init); + code = build (MODIFY_EXPR, type, dest, cons); code = build_stmt (EXPR_STMT, code); + *pcode = code; pcode = &TREE_CHAIN (code); } break; |