diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/constexpr-abi1.C')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/constexpr-abi1.C | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-abi1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-abi1.C new file mode 100644 index 00000000000..e83f142300a --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-abi1.C @@ -0,0 +1,16 @@ +// PR c++/47301 +// { dg-options "-std=c++0x -fabi-version=1" } + +struct A +{ + constexpr operator int () + { + return 1; + } +}; + +template < int > struct B +{ + static constexpr A a = A(); + int ar[a]; +}; |