http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52045
--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-30
12:25:02 UTC ---
This is a case similar to PR22037, see execute_function_todo, passes calling
cleanup_tree_cfg need to expect to update SSA form.
bool cleanup = cleanup_tree_cfg ();
if (cleanup && (cfun->curr_properties & PROP_ssa))
flags |= TODO_remove_unused_locals;
/* When cleanup_tree_cfg merges consecutive blocks, it may
perform some simplistic propagation when removing single
valued PHI nodes. This propagation may, in turn, cause the
SSA form to become out-of-date (see PR 22037). So, even
if the parent pass had not scheduled an SSA update, we may
still need to do one. */
if (!(flags & TODO_update_ssa_any) && need_ssa_update_p (cfun))
flags |= TODO_update_ssa;
the reasoning here is similar.
Index: gcc/tree-optimize.c
===================================================================
--- gcc/tree-optimize.c (revision 183695)
+++ gcc/tree-optimize.c (working copy)
@@ -157,7 +157,9 @@ struct gimple_opt_pass pass_all_early_op
static unsigned int
execute_cleanup_cfg_post_optimizing (void)
{
- cleanup_tree_cfg ();
+ unsigned int todo = 0;
+ if (cleanup_tree_cfg ())
+ todo |= TODO_update_ssa;
maybe_remove_unreachable_handlers ();
cleanup_dead_labels ();
group_case_labels ();
@@ -190,7 +192,7 @@ execute_cleanup_cfg_post_optimizing (voi
}
}
}
- return 0;
+ return todo;
}
struct gimple_opt_pass pass_cleanup_cfg_post_optimizing =