ast_loop must end by entering the outgoing block

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-05-04 12:01:53 +02:00
parent e0331ef15f
commit c670a8d278

3
ast.c
View file

@ -1076,6 +1076,9 @@ bool ast_loop_codegen(ast_loop *self, ast_function *func, bool lvalue, ir_value
end_bincrement = func->curblock;
}
/* In any case now, we continue from the outgoing block */
func->curblock = bout;
/* Now all blocks are in place */
/* From 'bin' we jump to whatever comes first */
if (bprecond && !ir_block_create_jump(bin, bprecond))