mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-21 17:30:54 +08:00
re PR c++/71166 (ICE with nested constexpr/initializer)
PR c++/71166 * g++.dg/cpp0x/constexpr-array18.C: New test. From-SVN: r244450
This commit is contained in:
parent
aa1ba96b87
commit
e3017e522a
@ -1,3 +1,8 @@
|
||||
2017-01-13 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR c++/71166
|
||||
* g++.dg/cpp0x/constexpr-array18.C: New test.
|
||||
|
||||
2017-01-13 Janne Blomqvist <jb@gcc.gnu.org>
|
||||
|
||||
PR fortran/78534
|
||||
|
23
gcc/testsuite/g++.dg/cpp0x/constexpr-array18.C
Normal file
23
gcc/testsuite/g++.dg/cpp0x/constexpr-array18.C
Normal file
@ -0,0 +1,23 @@
|
||||
// PR c++/71166
|
||||
// { dg-do compile { target c++11 } }
|
||||
|
||||
struct Foo { int value; };
|
||||
|
||||
constexpr Foo MakeFoo() { return Foo{0}; }
|
||||
|
||||
struct Bar {
|
||||
Foo color = MakeFoo();
|
||||
};
|
||||
|
||||
struct BarContainer {
|
||||
Bar array[1];
|
||||
};
|
||||
|
||||
Foo X ()
|
||||
{
|
||||
return MakeFoo ();
|
||||
}
|
||||
|
||||
void Foo() {
|
||||
new BarContainer();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user