From 49cd86e8ed8aa2675131c6fe8d5b71b18b7aab40 Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Sun, 19 Aug 2012 19:43:41 +0200 Subject: [PATCH] don't try to create jumps in ifs if the block is already done --- ast.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ast.c b/ast.c index 1570388..d0d4334 100644 --- a/ast.c +++ b/ast.c @@ -1333,9 +1333,9 @@ bool ast_ifthen_codegen(ast_ifthen *self, ast_function *func, bool lvalue, ir_va return false; /* add jumps ot the merge block */ - if (ontrue && !ir_block_create_jump(ontrue, merge)) + if (ontrue && !ontrue->final && !ir_block_create_jump(ontrue, merge)) return false; - if (onfalse && !ir_block_create_jump(onfalse, merge)) + if (onfalse && !onfalse->final && !ir_block_create_jump(onfalse, merge)) return false; /* we create the if here, that way all blocks are ordered :) -- 2.39.2