From 4d335c87046d8daa8af2d41b2b0cba0d5e3c1c8f Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Sun, 19 Aug 2012 16:49:24 +0200 Subject: [PATCH] ir: fix bug that functions without declared locals would put temps at position zero ... --- ir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ir.c b/ir.c index dcf03e0..ed01439 100644 --- a/ir.c +++ b/ir.c @@ -2548,7 +2548,7 @@ static bool gen_global_function(ir_builder *ir, ir_value *global) fun.firstlocal = code_globals_elements; fun.locals = irfun->allocated_locals + irfun->locals_count; - local_var_end = 0; + local_var_end = fun.firstlocal; for (i = 0; i < irfun->locals_count; ++i) { if (!ir_builder_gen_global(ir, irfun->locals[i])) { irerror(irfun->locals[i]->context, "Failed to generate global %s\n", irfun->locals[i]->name); -- 2.39.2