Explorar o código

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.
Quentin Carbonneaux %!s(int64=6) %!d(string=hai) anos
pai
achega
d84f5fcbb7
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      spill.c

+ 1 - 0
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;