diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2014-11-03 10:49:05 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2014-11-03 10:49:05 +0000 |
commit | 3e449f806186f587897b5026684aea894a66ac3a (patch) | |
tree | 3e8841ad591f8745d1fda968d1453b5d12162fcd | |
parent | 956623c1378de3c48e77b23c2f2fa275f183e270 (diff) | |
download | gcc-3e449f806186f587897b5026684aea894a66ac3a.zip gcc-3e449f806186f587897b5026684aea894a66ac3a.tar.gz gcc-3e449f806186f587897b5026684aea894a66ac3a.tar.bz2 |
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
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/constexpr-ctor16.C | 11 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/constexpr-ctor17.C | 13 |
3 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7e97d61..480e139 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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 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 0000000..12aaeeb --- /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 0000000..ed82a14 --- /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; |