From: Jason Merrill Date: Mon, 17 Nov 2003 16:33:59 +0000 (-0500) Subject: re PR c++/11266 ([tree-ssa] ICE with placement new) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2a53208d3c33530bbb30121080fea21e5b2c8bf7;p=gcc.git re PR c++/11266 ([tree-ssa] ICE with placement new) PR c++/11266 * gimplify.c (gimple_add_tmp_var): Also make sure seen_in_bind_expr isn't set. (mostly_copy_tree_r): Don't copy a TARGET_EXPR. (gimplify_target_expr): Only expand a TARGET_EXPR the first time we see it. [[Split portion of a mixed commit.]] From-SVN: r73674.2 --- diff --git a/gcc/testsuite/g++.dg/init/placement1.C b/gcc/testsuite/g++.dg/init/placement1.C new file mode 100644 index 00000000000..50030af91db --- /dev/null +++ b/gcc/testsuite/g++.dg/init/placement1.C @@ -0,0 +1,10 @@ +// PR c++/11266 +// We were expanding the same TARGET_EXPR twice, for placement new and +// delete. + +void* operator new (unsigned int, void*) throw(); +void operator delete (void*, void*) throw(); + +struct A { A(); }; + +void foo() { new(new A)A; }