2011-06-30 Jason Merrill <jason@redhat.com>
+ PR c++/49355
+ * tree.c (stabilize_init): Handle aggregate initialization.
+
PR c++/48481
* name-lookup.c (struct arg_lookup): Add fn_set.
(add_function): Check it.
t = TARGET_EXPR_INITIAL (t);
if (TREE_CODE (t) == COMPOUND_EXPR)
t = expr_last (t);
- if (TREE_CODE (t) == CONSTRUCTOR
- && EMPTY_CONSTRUCTOR_P (t))
- /* Default-initialization. */
- return true;
+ if (TREE_CODE (t) == CONSTRUCTOR)
+ {
+ /* Aggregate initialization: stabilize each of the field
+ initializers. */
+ unsigned i;
+ tree value;
+ bool good = true;
+ FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (t), i, value)
+ if (!stabilize_init (value, initp))
+ good = false;
+ return good;
+ }
/* If the initializer is a COND_EXPR, we can't preevaluate
anything. */
+2011-06-30 Jason Merrill <jason@redhat.com>
+
+ PR c++/49355
+ * g++.dg/cpp0x/initlist54.C: New.
+
2011-06-30 Martin Jambor <mjambor@suse.cz>
* gcc.dg/tree-ssa/sra-12.c: New test.