diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/constexpr-array.C')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/constexpr-array.C | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-array.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-array.C new file mode 100644 index 000000000..e37400a8b --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-array.C @@ -0,0 +1,15 @@ +// { dg-options -std=c++0x } +// { dg-final { scan-assembler-not "static_initialization" } } + +struct A +{ + int i; + constexpr A(): i(0) { } +}; + +struct B +{ + A a[4]; +}; + +extern const B b{}; |