2
0
mirror of git://gcc.gnu.org/git/gcc.git synced 2025-04-16 12:21:10 +08:00

re PR c++/57820 ([DR 253] NSDMI and const objects)

2014-11-03  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/57820
	* g++.dg/cpp0x/constexpr-ctor16.C: New.
	* g++.dg/cpp0x/constexpr-ctor17.C: Likewise.

From-SVN: r217035
This commit is contained in:
Paolo Carlini 2014-11-03 10:49:05 +00:00 committed by Paolo Carlini
parent 956623c137
commit 3e449f8061
3 changed files with 30 additions and 0 deletions

@ -1,3 +1,9 @@
2014-11-03 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/57820
* g++.dg/cpp0x/constexpr-ctor16.C: New.
* g++.dg/cpp0x/constexpr-ctor17.C: Likewise.
2014-11-03 Marc Glisse <marc.glisse@inria.fr>
PR tree-optimization/60770

@ -0,0 +1,11 @@
// PR c++/57820
// { dg-do compile { target c++11 } }
struct C
{
int a = 2;
int b = a + 1;
};
C c;
constexpr C d = {};

@ -0,0 +1,13 @@
// PR c++/57820
// { dg-do compile { target c++11 } }
struct C
{
int a = 2;
int b = a + 1;
constexpr C() {}
};
C c;
constexpr C d;