re PR c++/51621 ([c++0x] [4.6/4.7 Regression] ICE with invalid constexpr and array class member)
/cp 2011-12-20 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51621 * tree.c (diagnose_non_constexpr_vec_init): For value initialization pass void_type_node, not void_zero_node, to build_vec_init_elt. /testsuite 2011-12-20 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51621 * g++.dg/cpp0x/constexpr-ice5.C: New. From-SVN: r182556
This commit is contained in:
parent
a0c8d0c1e3
commit
7ac37b9675
|
@ -1,3 +1,9 @@
|
|||
2011-12-20 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/51621
|
||||
* tree.c (diagnose_non_constexpr_vec_init): For value initialization
|
||||
pass void_type_node, not void_zero_node, to build_vec_init_elt.
|
||||
|
||||
2011-12-20 Dodji Seketeli <dodji@redhat.com>
|
||||
|
||||
PR debug/49951
|
||||
|
|
|
@ -564,7 +564,7 @@ diagnose_non_constexpr_vec_init (tree expr)
|
|||
tree type = TREE_TYPE (VEC_INIT_EXPR_SLOT (expr));
|
||||
tree init, elt_init;
|
||||
if (VEC_INIT_EXPR_VALUE_INIT (expr))
|
||||
init = void_zero_node;
|
||||
init = void_type_node;
|
||||
else
|
||||
init = VEC_INIT_EXPR_INIT (expr);
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2011-12-20 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/51621
|
||||
* g++.dg/cpp0x/constexpr-ice5.C: New.
|
||||
|
||||
2011-12-20 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
* gcc.dg/c11-version-1.c, gcc.dg/c11-version-2.c,
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
// PR c++/51621
|
||||
// { dg-options -std=c++0x }
|
||||
|
||||
struct A
|
||||
{
|
||||
A() {}
|
||||
};
|
||||
|
||||
struct B
|
||||
{
|
||||
A a[1];
|
||||
constexpr B() : a() {} // { dg-error "non-constant|non-constexpr" }
|
||||
};
|
Loading…
Reference in New Issue