commit 5165fcae767801a20316530c0ec9f096158aa2e4 parent 0699cd2e575bcaa951cb7d97bc77ab9acb2c9970 Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu> Date: Fri, 24 Feb 2017 11:07:24 -0500 wrong assumption killsl() Diffstat:
M | load.c | | | 10 | ++++++++-- |
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/load.c b/load.c @@ -172,8 +172,14 @@ killsl(Ref r, Slice sl) if (rtype(sl.ref) != RTmp) return 0; a = &curf->tmp[sl.ref.val].alias; - assert(a->type==ALoc || a->type==AEsc || a->type==AUnk); - return req(a->base, r); + switch (a->type) { + default: die("unreachable"); + case ALoc: + case AEsc: + case AUnk: return req(a->base, r); + case ACon: + case ASym: return 0; + } } /* returns a ref containing the contents of the slice