From: Wolfgang (Blub) Bumiller Date: Sun, 19 Aug 2012 17:45:53 +0000 (+0200) Subject: same as before for loops: don't try creating a jump if the body ends in a return X-Git-Tag: 0.1-rc1~150 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4254845227f14d0c2ec0b8e628ee1d70c5ec0001;p=xonotic%2Fgmqcc.git same as before for loops: don't try creating a jump if the body ends in a return --- 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; }