mirror of
https://github.com/danog/ir.git
synced 2024-12-02 09:38:29 +01:00
Fixed crash in case --emit-c is used together with -O0
This commit is contained in:
parent
5b2619243a
commit
bc0db1432e
@ -743,6 +743,10 @@ static int ir_emit_func(ir_ctx *ctx, const char *name, FILE *f)
|
|||||||
}
|
}
|
||||||
fprintf(f, ")\n{\n");
|
fprintf(f, ")\n{\n");
|
||||||
|
|
||||||
|
if (!ctx->prev_ref) {
|
||||||
|
ir_build_prev_refs(ctx);
|
||||||
|
}
|
||||||
|
|
||||||
/* Emit declarations for local variables */
|
/* Emit declarations for local variables */
|
||||||
vars = ir_bitset_malloc(ctx->vregs_count + 1);
|
vars = ir_bitset_malloc(ctx->vregs_count + 1);
|
||||||
for (b = 1, bb = ctx->cfg_blocks + b; b <= ctx->cfg_blocks_count; b++, bb++) {
|
for (b = 1, bb = ctx->cfg_blocks + b; b <= ctx->cfg_blocks_count; b++, bb++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user