OSDN Git Service

* tree.c (bot_manip): Check TREE_CONSTANT rather than
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 31 Aug 2000 00:38:34 +0000 (00:38 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 31 Aug 2000 00:38:34 +0000 (00:38 +0000)
        !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
        build_target_expr_with_type for the non-AGGR_INIT_EXPR case.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36081 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/g++.old-deja/g++.other/defarg5.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.old-deja/g++.other/defarg5.C b/gcc/testsuite/g++.old-deja/g++.other/defarg5.C
new file mode 100644 (file)
index 0000000..ba15d96
--- /dev/null
@@ -0,0 +1,20 @@
+// Bug: the SAVE_EXPR in the new expression remembers that it's in g(),
+// causing the compiler to crash in h().
+
+// Build don't link:
+
+struct A {
+  A ();
+};
+
+void f (A* = new A);
+
+void g ()
+{
+  f ();
+}
+
+void h ()
+{
+  f ();
+}