From: Jason Merrill Date: Thu, 31 Aug 2000 00:38:34 +0000 (-0400) Subject: tree.c (bot_manip): Check TREE_CONSTANT rather than !TREE_SIDE_EFFECTS. X-Git-Tag: prereleases/libstdc++-2.92~4340 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=83bbca3be78c3289a7c5ce9fb498cd26257c6e77;p=thirdparty%2Fgcc.git 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 --- 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 000000000000..ba15d96762df --- /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 (); +}