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:
Marek Polacek 2017-01-13 17:27:54 +00:00 committed by Marek Polacek
parent aa1ba96b87
commit e3017e522a
2 changed files with 28 additions and 0 deletions

View File

@ -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

View 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();
}