make sure a spill slot is initialized
If an instruction does not have a result, the variable `s` is not set. This could lead to a bogus slot assignment.
This commit is contained in:
parent
f622efa05a
commit
d84f5fcbb7
1 changed files with 1 additions and 0 deletions
1
spill.c
1
spill.c
|
@ -404,6 +404,7 @@ spill(Fn *fn)
|
|||
continue;
|
||||
}
|
||||
bszero(w);
|
||||
s = -1;
|
||||
if (!req(i->to, R)) {
|
||||
assert(rtype(i->to) == RTmp);
|
||||
t = i->to.val;
|
||||
|
|
Loading…
Add table
Reference in a new issue