Mark all subsequent blocks as reachable after if/goto merge.

If an if/goto merge is done in the first dead block pass, no blocks after
the merge have their rechable flag set because they've never been tested.
This commit is contained in:
Bill Currie 2012-05-04 10:58:18 +09:00
parent 8ddd58f951
commit 75aa28cfac

View file

@ -1146,8 +1146,9 @@ remove_dead_blocks (sblock_t *blocks)
remove_label_from_dest (s->opb->o.label);
s->opb->o.label = sb->statements->opa->o.label;
invert_conditional (s);
sb->next->reachable = 1;
sb->reachable = 0;
for (sb = sb->next; sb; sb = sb->next)
sb->reachable = 1;
break;
} else if (!is_goto (s) && !is_return (s)) {
sb->reachable = 1;