Fix yet another empty block issue.

I think I need to rework all the code in there, but this will do for now.
This commit is contained in:
Bill Currie 2012-11-25 15:01:36 +09:00
parent f6e5428382
commit 578ad07487

View file

@ -1352,7 +1352,8 @@ remove_dead_blocks (sblock_t *blocks)
continue;
}
s = (statement_t *) sblock->tail;
if (is_conditional (s) && is_goto (sb->statements)
if (is_conditional (s)
&& sb->statements && is_goto (sb->statements)
&& s->opb->o.label->dest == sb->next) {
debug (0, "merging if/goto %p %p", sblock, sb);
unuse_label (s->opb->o.label);