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:
parent
495d26d6ce
commit
83bbca3be7
20
gcc/testsuite/g++.old-deja/g++.other/defarg5.C
Normal file
20
gcc/testsuite/g++.old-deja/g++.other/defarg5.C
Normal 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 ();
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user