aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/init.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2019-12-11 11:51:09 -0500
committerJason Merrill <jason@gcc.gnu.org>2019-12-11 11:51:09 -0500
commit0e5def817a5142dd3eeb91ce4acf9ea22a43ad94 (patch)
tree82e8f47e2bc1ff4d1466c5bfb494aa16f830e8b5 /gcc/cp/init.c
parent60e457d9cad52491bbff434bf611b21f2da07ecc (diff)
downloadgcc-0e5def817a5142dd3eeb91ce4acf9ea22a43ad94.zip
gcc-0e5def817a5142dd3eeb91ce4acf9ea22a43ad94.tar.gz
gcc-0e5def817a5142dd3eeb91ce4acf9ea22a43ad94.tar.bz2
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
Diffstat (limited to 'gcc/cp/init.c')
-rw-r--r--gcc/cp/init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index e40afe2..ecd0951 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -3591,7 +3591,7 @@ build_new_1 (vec<tree, va_gc> **placement, tree type, tree nelts,
complete_ctor_identifier,
init, elt_type,
LOOKUP_NORMAL,
- complain);
+ complain|tf_no_cleanup);
}
else if (explicit_value_init_p)
{