From 14210a62ef7ff1529f93b5c050553049e1bedd4a Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Sun, 19 Aug 2012 19:54:15 +0200 Subject: [PATCH] functions which have no living values but store_return values may cause the allocator to be run with no allocations being made - in this case we shouldn't try accessing the empty array and simply exit the allocator --- ir.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ir.c b/ir.c index 158e207..0a6a8da 100644 --- a/ir.c +++ b/ir.c @@ -1894,6 +1894,10 @@ bool ir_function_allocate_locals(ir_function *self) } } + if (!alloc.sizes) { + goto cleanup; + } + /* Adjust slot positions based on sizes */ if (!function_allocator_positions_add(&alloc, 0)) goto error; -- 2.39.2