mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-31 13:10:34 +00:00
Make sure initialized locals that are treated as constants don't get relocated. Fixes the airfist bug in prozac
This commit is contained in:
parent
3e50aae01f
commit
3431fea56d
2 changed files with 3 additions and 0 deletions
|
@ -238,6 +238,7 @@ ReuseConstant (expr_t *expr, def_t *def)
|
|||
def->ofs = cn->ofs;
|
||||
def->initialized = def->constant = 1;
|
||||
def->nosave = 1;
|
||||
def->local = 0;
|
||||
cn = def;
|
||||
} else {
|
||||
if (cn->type != type) {
|
||||
|
|
|
@ -468,6 +468,8 @@ finish_compilation (void)
|
|||
num_localdefs += f->scope->space->size;
|
||||
}
|
||||
for (def = f->scope->head; def; def = def->def_next) {
|
||||
if (!def->local)
|
||||
continue;
|
||||
def->ofs += df->parm_start;
|
||||
relocate_refs (def->refs, def->ofs);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue