------- Comment #4 from rguenth at gcc dot gnu dot org 2007-06-21 10:38 ------- The problem is introduced by tree-ssa-threadupdate.c:thread_single_edge where we have the single_pred_p case but fail to clear the edge flags as we do for example in DOMs propagate_rhs_into_lhs. So the following seems to work but I'm not sure if this is enough:
Index: tree-ssa-threadupdate.c =================================================================== --- tree-ssa-threadupdate.c (revision 125884) +++ tree-ssa-threadupdate.c (working copy) @@ -636,6 +636,9 @@ thread_single_edge (edge e) /* If BB has just a single predecessor, we should only remove the control statements at its end, and successors except for ETO. */ remove_ctrl_stmt_and_useless_edges (bb, eto->dest); + eto->flags &= ~(EDGE_TRUE_VALUE | EDGE_FALSE_VALUE); + eto->flags &= ~EDGE_ABNORMAL; + eto->flags |= EDGE_FALLTHRU; return bb; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32451