From 4254845227f14d0c2ec0b8e628ee1d70c5ec0001 Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Sun, 19 Aug 2012 19:45:53 +0200 Subject: [PATCH] same as before for loops: don't try creating a jump if the body ends in a return --- ast.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ast.c b/ast.c index d0d4334..7c349b4 100644 --- a/ast.c +++ b/ast.c @@ -1653,7 +1653,7 @@ bool ast_loop_codegen(ast_loop *self, ast_function *func, bool lvalue, ir_value else if (bpostcond) tmpblock = bpostcond; else if (bprecond) tmpblock = bprecond; else tmpblock = bout; - if (!ir_block_create_jump(end_bbody, tmpblock)) + if (!end_bbody->final && !ir_block_create_jump(end_bbody, tmpblock)) return false; } -- 2.39.2