re PR c++/51619 ([c++0x] [4.6 Regression] ICE with array class member)
PR c++/51619 * 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. From-SVN: r182485
This commit is contained in:
parent
cd99c23ca4
commit
23a3541f27
|
@ -1,5 +1,9 @@
|
|||
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.
|
||||
|
||||
|
|
|
@ -7065,7 +7065,7 @@ cxx_eval_vec_init_1 (const constexpr_call *call, tree atype, tree init,
|
|||
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,
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
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
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
// 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;
|
Loading…
Reference in New Issue