From 525ca7cc0a25ba914c7643bd111f3f5cf5a6abf4 Mon Sep 17 00:00:00 2001 From: jason Date: Fri, 16 Feb 2018 20:05:28 +0000 Subject: PR c++/83835 - C++17 error with constructor ctors. * call.c (build_special_member_call): Set TARGET_EXPR_DIRECT_INIT_P. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257757 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/g++.dg/cpp0x/constexpr-ctor21.C | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/constexpr-ctor21.C (limited to 'gcc/testsuite/g++.dg/cpp0x/constexpr-ctor21.C') 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 ) {} +}; -- cgit v1.2.1