endlessloops don't have any other block which could be a continue-target-block, so use the body itself to not continue to NULL

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-11-25 23:50:42 +01:00
parent 23e0637e85
commit 0564e701c0

2
ast.c
View file

@ -2401,6 +2401,8 @@ bool ast_loop_codegen(ast_loop *self, ast_function *func, bool lvalue, ir_value
old_bcontinue = func->continueblock; old_bcontinue = func->continueblock;
func->breakblock = bbreak; func->breakblock = bbreak;
func->continueblock = bcontinue; func->continueblock = bcontinue;
if (!func->continueblock)
func->continueblock = bbody;
/* generate */ /* generate */
cgen = self->body->expression.codegen; cgen = self->body->expression.codegen;