From f9e177efd6985b609aaaa97b51154147950f65ff Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 3 Mar 2011 17:50:46 +0900 Subject: [PATCH] Obtain the label to be removed from the correct place. This fixes the undetected dead block after "if return else return". --- tools/qfcc/source/statements.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/qfcc/source/statements.c b/tools/qfcc/source/statements.c index 38a2a2d5c..4ed70dde0 100644 --- a/tools/qfcc/source/statements.c +++ b/tools/qfcc/source/statements.c @@ -1001,16 +1001,16 @@ remove_dead_blocks (sblock_t *blocks) debug (0, "removing dead block %p", sb); - sblock->next = sb->next; - free_sblock (sb); - - s = (statement_t *) sblock->tail; + s = (statement_t *) sb->tail; if (!strcmp (s->opcode, "")) label = s->opa->o.label; else if (!strncmp (s->opcode, "opb->o.label; remove_label_from_dest (label); did_something = 1; + + sblock->next = sb->next; + free_sblock (sb); } } } while (did_something);