diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2017-02-24 11:07:24 -0500 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2017-02-24 11:07:24 -0500 |
commit | 5165fcae767801a20316530c0ec9f096158aa2e4 (patch) | |
tree | 2f88e711824f6cc0c98ed809c18c510309e13f39 | |
parent | 0699cd2e575bcaa951cb7d97bc77ab9acb2c9970 (diff) | |
download | roux-5165fcae767801a20316530c0ec9f096158aa2e4.tar.gz |
wrong assumption killsl()
-rw-r--r-- | load.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/load.c b/load.c index 4805720..bb4acbc 100644 --- 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 |