aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>2000-08-30 20:38:34 -0400
committerJason Merrill <jason@gcc.gnu.org>2000-08-30 20:38:34 -0400
commit83bbca3be78c3289a7c5ce9fb498cd26257c6e77 (patch)
tree90fc36147d4da78d4f68555af5a34f674de93e6d
parent495d26d6ce58caf1f86a1039b0c44e1b23878bc6 (diff)
downloadgcc-83bbca3be78c3289a7c5ce9fb498cd26257c6e77.zip
gcc-83bbca3be78c3289a7c5ce9fb498cd26257c6e77.tar.gz
gcc-83bbca3be78c3289a7c5ce9fb498cd26257c6e77.tar.bz2
tree.c (bot_manip): Check TREE_CONSTANT rather than !TREE_SIDE_EFFECTS.
* tree.c (bot_manip): Check TREE_CONSTANT rather than !TREE_SIDE_EFFECTS. Call break_out_target_exprs and build_target_expr_with_type for the non-AGGR_INIT_EXPR case. From-SVN: r36081
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/defarg5.C20
1 files changed, 20 insertions, 0 deletions
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
index 0000000..ba15d96
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/defarg5.C
@@ -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 ();
+}