PR c++/57082 - new X{} and private destructor.
authorJason Merrill <jason@redhat.com>
Wed, 11 Dec 2019 16:51:09 +0000 (11:51 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 11 Dec 2019 16:51:09 +0000 (11:51 -0500)
commit0e5def817a5142dd3eeb91ce4acf9ea22a43ad94
tree82e8f47e2bc1ff4d1466c5bfb494aa16f830e8b5
parent60e457d9cad52491bbff434bf611b21f2da07ecc
PR c++/57082 - new X{} and private destructor.

build_new_1 already passes tf_no_cleanup to build_value_init, but in this
testcase we end up calling build_value_init by way of
build_special_member_call, so we need to pass it to that function as well.

* init.c (build_new_1): Also pass tf_no_cleanup to
build_special_member_call.

From-SVN: r279236
gcc/cp/ChangeLog
gcc/cp/init.c
gcc/testsuite/g++.dg/cpp0x/initlist-new2.C [new file with mode: 0644]