Message ID | 20111219140646.GF1957@tyan-ft48-01.lab.bos.redhat.com |
---|---|
State | New |
Headers | show |
OK. Jason
--- gcc/cp/semantics.c.jj 2011-12-19 09:21:01.000000000 +0100 +++ gcc/cp/semantics.c 2011-12-19 10:45:44.498472626 +0100 @@ -7065,7 +7065,7 @@ cxx_eval_vec_init_1 (const constexpr_cal 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, --- gcc/testsuite/g++.dg/cpp0x/pr51619.C.jj 2011-12-19 10:49:45.128086227 +0100 +++ gcc/testsuite/g++.dg/cpp0x/pr51619.C 2011-12-19 10:49:09.000000000 +0100 @@ -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;