https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57082

--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Fri Dec 13 05:10:11 2019
New Revision: 279335

URL: https://gcc.gnu.org/viewcvs?rev=279335&root=gcc&view=rev
Log:
        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.

Added:
    branches/gcc-9-branch/gcc/testsuite/g++.dg/cpp0x/initlist-new2.C
Modified:
    branches/gcc-9-branch/gcc/cp/ChangeLog
    branches/gcc-9-branch/gcc/cp/init.c

Reply via email to