PR c++/19263
* typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
Store code to *pcode.
* g++.dg/init/vector1.C: New test.
From-SVN: r93674
+2005-01-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/19263
+ * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
+ of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
+ Store code to *pcode.
+
2004-12-28 Jakub Jelinek <jakub@redhat.com>
PR c++/18384, c++/18327
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;
+2005-01-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/19263
+ * g++.dg/init/vector1.C: New test.
+
2005-01-07 Jakub Jelinek <jakub@redhat.com>
* gcc.c-torture/execute/20050107-1.c: New test.