* semantics.c (cxx_eval_vec_init_1): If init is NULL for
multidimensional array, just set eltinit to NULL_TREE.
* g++.dg/cpp0x/pr51619.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182485
138bc75d-0d04-0410-961f-
82ee72b054a4
2011-12-19 Jakub Jelinek <jakub@redhat.com>
+ PR c++/51619
+ * semantics.c (cxx_eval_vec_init_1): If init is NULL for
+ multidimensional array, just set eltinit to NULL_TREE.
+
* cp-gimplify.c (gimplify_must_not_throw_expr): Use
gimple_seq_add_stmt_without_update instead of gimplify_seq_add_stmt.
if (TREE_CODE (elttype) == ARRAY_TYPE)
{
/* A multidimensional array; recurse. */
- if (value_init)
+ if (value_init || init == NULL_TREE)
eltinit = NULL_TREE;
else
eltinit = cp_build_array_ref (input_location, init, idx,
+2011-12-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/51619
+ * g++.dg/cpp0x/pr51619.C: New test.
+
2011-12-19 Tobias Burnus <burnus@net-b.de>
PR fortran/51605
--- /dev/null
+// PR c++/51619
+// { dg-do compile }
+// { dg-options "-std=c++0x" }
+
+struct A { virtual ~A(); };
+struct B { A a[1][1]; } b;
+struct C { A a[3][3]; } c;