From: Matthias Braun Date: Fri, 19 Jun 2009 15:12:58 +0000 (+0000) Subject: fix default proj getting constructed in wrong block X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=99626f0b40711908df2ba153ee4dc861456721cd;p=cparser fix default proj getting constructed in wrong block [r26165] --- diff --git a/ast2firm.c b/ast2firm.c index eb8dd33..510d293 100644 --- a/ast2firm.c +++ b/ast2firm.c @@ -4987,12 +4987,14 @@ static ir_node *get_break_label(void) static void switch_statement_to_firm(switch_statement_t *statement) { - ir_node *first_block = get_cur_block(); + ir_node *first_block = NULL; dbg_info *dbgi = get_dbg_info(&statement->base.source_position); ir_node *cond = NULL; - if (first_block != NULL) { + + if (get_cur_block() != NULL) { ir_node *expression = expression_to_firm(statement->expression); cond = new_d_Cond(dbgi, expression); + first_block = get_cur_block(); } set_cur_block(NULL);