summary refs log tree commit diff
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2017-02-24 11:07:24 -0500
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2017-02-24 11:07:24 -0500
commit5165fcae767801a20316530c0ec9f096158aa2e4 (patch)
tree2f88e711824f6cc0c98ed809c18c510309e13f39
parent0699cd2e575bcaa951cb7d97bc77ab9acb2c9970 (diff)
downloadroux-5165fcae767801a20316530c0ec9f096158aa2e4.tar.gz
wrong assumption killsl()
-rw-r--r--load.c10
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