diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/constexpr-92015.C')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/constexpr-92015.C | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-92015.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-92015.C new file mode 100644 index 00000000000..60f288ee993 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-92015.C @@ -0,0 +1,7 @@ +// PR c++/92015 +// { dg-do compile { target c++11 } } + +struct S1 { char c[6] {'h', 'e', 'l', 'l', 'o', 0}; }; +struct S2 { char c[6] = "hello"; }; +static_assert (S1{}.c[0] == 'h', ""); +static_assert (S2{}.c[0] == 'h', ""); |