From 3987509493e204671efa86a01fbad688eaddac43 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Wed, 4 Jul 2012 15:16:02 +0200 Subject: [PATCH] Do not actually return after generating a call, there are other isntructions following --- ast.c | 2 ++ ir.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ast.c b/ast.c index d22e239..e50f168 100644 --- a/ast.c +++ b/ast.c @@ -640,7 +640,9 @@ bool ast_function_codegen(ast_function *self, ir_builder *ir) { if (!self->vtype->expression.next || self->vtype->expression.next->expression.vtype == TYPE_VOID) + { return ir_block_create_return(self->curblock, NULL); + } else { /* error("missing return"); */ diff --git a/ir.c b/ir.c index 41e90d1..e8b7382 100644 --- a/ir.c +++ b/ir.c @@ -2263,7 +2263,7 @@ tailcall: if (code_statements_add(stmt) < 0) return false; } - return true; + continue; } if (instr->opcode == INSTR_STATE) { -- 2.39.2