From: Matthias Braun Date: Wed, 10 Sep 2008 14:18:09 +0000 (+0000) Subject: we need to keep_alive memory as well for potential endless loops X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=664d8782716666d650f9286b35d230ed363e5625;p=cparser we need to keep_alive memory as well for potential endless loops [r21821] --- diff --git a/ast2firm.c b/ast2firm.c index 25e1aa7..b19c5ea 100644 --- a/ast2firm.c +++ b/ast2firm.c @@ -4226,6 +4226,8 @@ static void while_statement_to_firm(while_statement_t *statement) add_immBlock_pred(body_block, header_jmp); keep_alive(body_block); + set_cur_block(body_block); + keep_alive(get_store()); } else { if (false_block == NULL) { false_block = new_immBlock(); @@ -4369,6 +4371,7 @@ static void for_statement_to_firm(for_statement_t *statement) false_block); } else { keep_alive(header_block); + keep_alive(get_store()); jmp = new_Jmp(); add_immBlock_pred(body_block, jmp); } @@ -4573,6 +4576,7 @@ static void label_to_firm(const label_statement_t *statement) } set_cur_block(block); + keep_alive(get_store()); keep_alive(block); if (statement->statement != NULL) { @@ -5507,4 +5511,6 @@ void translation_unit_to_firm(translation_unit_t *unit) scope_to_firm(&unit->scope); global_asm_to_firm(unit->global_asm); + + current_ir_graph = NULL; }