diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/constexpr-ctor21.C')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/constexpr-ctor21.C | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor21.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor21.C new file mode 100644 index 00000000000..4bf57b9e897 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor21.C @@ -0,0 +1,15 @@ +// PR c++/83835 +// { dg-do compile { target c++11 } } + +struct Z +{ + void const * p_; + constexpr Z( void const * p ): p_( p ) {} + ~Z(); +}; + +struct Y +{ + Z z_; + constexpr Y() noexcept: z_( this ) {} +}; |