PR c++/60980
* init.c (build_value_init): Don't try to call an array constructor.
From-SVN: r209934
2014-04-30 Jason Merrill <jason@redhat.com>
+ PR c++/60980
+ * init.c (build_value_init): Don't try to call an array constructor.
+
PR c++/60951
* typeck2.c (massage_init_elt): Use maybe_constant_init.
gcc_assert (!processing_template_decl
|| (SCALAR_TYPE_P (type) || TREE_CODE (type) == ARRAY_TYPE));
- if (type_build_ctor_call (type))
+ if (CLASS_TYPE_P (type)
+ && type_build_ctor_call (type))
{
tree ctor = build_aggr_init_expr
(type,
--- /dev/null
+// PR c++/60980
+// { dg-do compile { target c++11 } }
+
+struct x0
+{
+ x0 () = default;
+};
+struct x1
+{
+ x0 x2[2];
+ void x3 ()
+ {
+ x1 ();
+ }
+};