qbe

Internal scc patchset buffer for QBE
Log | Files | Refs | README | LICENSE

commit d84f5fcbb75dcf8f6ff1f12e7509d05598a4b561
parent f622efa05a3fbd4938d1fb09e692ae0785770bc1
Author: Quentin Carbonneaux <quentin@c9x.me>
Date:   Mon,  8 Apr 2019 11:52:44 +0200

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.

Diffstat:
Mspill.c | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/spill.c b/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;