aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>2003-11-17 11:33:59 -0500
committerJason Merrill <jason@gcc.gnu.org>2003-11-17 11:33:59 -0500
commit2a53208d3c33530bbb30121080fea21e5b2c8bf7 (patch)
tree4a7fd68f62c47816fd50090e692c8ca50e39e391 /gcc
parentcb7a5092bfe1a298362804cc91f8a53a827ef955 (diff)
downloadgcc-2a53208d3c33530bbb30121080fea21e5b2c8bf7.zip
gcc-2a53208d3c33530bbb30121080fea21e5b2c8bf7.tar.gz
gcc-2a53208d3c33530bbb30121080fea21e5b2c8bf7.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/g++.dg/init/placement1.C10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/init/placement1.C b/gcc/testsuite/g++.dg/init/placement1.C
new file mode 100644
index 0000000..50030af
--- /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; }