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

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-08-19 19:54:15 +02:00
parent 4254845227
commit 14210a62ef

4
ir.c
View file

@ -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;