diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor4.C')
-rw-r--r-- | gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor4.C | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor4.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor4.C new file mode 100644 index 0000000..c494712 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor4.C @@ -0,0 +1,15 @@ +// PR c++/46873 +// { dg-do compile { target c++11 } } + +struct S +{ + int i:1; +}; + +struct T +{ + const S s; + constexpr T (S a = S ()) : s (a) { } +}; + +T t; |