From 83bbca3be78c3289a7c5ce9fb498cd26257c6e77 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 30 Aug 2000 20:38:34 -0400 Subject: [PATCH] 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 --- gcc/testsuite/g++.old-deja/g++.other/defarg5.C | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 gcc/testsuite/g++.old-deja/g++.other/defarg5.C 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 (); +} -- 2.7.4