From: Paolo Carlini Date: Mon, 3 Nov 2014 10:49:05 +0000 (+0000) Subject: re PR c++/57820 ([DR 253] NSDMI and const objects) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3e449f806186f587897b5026684aea894a66ac3a;p=gcc.git re PR c++/57820 ([DR 253] NSDMI and const objects) 2014-11-03 Paolo Carlini PR c++/57820 * g++.dg/cpp0x/constexpr-ctor16.C: New. * g++.dg/cpp0x/constexpr-ctor17.C: Likewise. From-SVN: r217035 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7e97d61895f..480e139387a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2014-11-03 Paolo Carlini + + PR c++/57820 + * g++.dg/cpp0x/constexpr-ctor16.C: New. + * g++.dg/cpp0x/constexpr-ctor17.C: Likewise. + 2014-11-03 Marc Glisse PR tree-optimization/60770 diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor16.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor16.C new file mode 100644 index 00000000000..12aaeebf091 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor16.C @@ -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 = {}; diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor17.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor17.C new file mode 100644 index 00000000000..ed82a14e651 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor17.C @@ -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;