diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c5893c967c7..f23dfa2177a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2005-08-03 Zdenek Dvorak + + PR tree-optimization/23157 + * tree-scalar-evolution.c (scev_const_prop): Unshare trees + before emitting them. + 2005-08-03 Volker Reichelt PR tree-optimization/19899 diff --git a/gcc/tree-scalar-evolution.c b/gcc/tree-scalar-evolution.c index 507e3e91947..65348d08402 100644 --- a/gcc/tree-scalar-evolution.c +++ b/gcc/tree-scalar-evolution.c @@ -2719,6 +2719,7 @@ scev_const_prop (void) in loop into account. */ if (force_expr_to_var_cost (def) >= target_spill_cost) continue; + def = unshare_expr (def); if (is_gimple_val (def)) stmts = NULL_TREE;