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
This commit is contained in:
Jason Merrill 2000-08-30 20:38:34 -04:00
parent 495d26d6ce
commit 83bbca3be7

View File

@ -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 ();
}