diff options
author | Quentin Carbonneaux <quentin@c9x.me> | 2019-04-08 11:52:44 +0200 |
---|---|---|
committer | Quentin Carbonneaux <quentin@c9x.me> | 2019-04-08 11:52:44 +0200 |
commit | d84f5fcbb75dcf8f6ff1f12e7509d05598a4b561 (patch) | |
tree | 1cdff8a0d6fc3200ea793ba1c848d95375010ebd | |
parent | f622efa05a3fbd4938d1fb09e692ae0785770bc1 (diff) | |
download | roux-d84f5fcbb75dcf8f6ff1f12e7509d05598a4b561.tar.gz |
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.
-rw-r--r-- | spill.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/spill.c b/spill.c index f0b593a..0742caa 100644 --- 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; |