From 5165fcae767801a20316530c0ec9f096158aa2e4 Mon Sep 17 00:00:00 2001
From: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date: Fri, 24 Feb 2017 11:07:24 -0500
Subject: [PATCH] wrong assumption killsl()

---
 load.c | 10 ++++++++--
 1 file 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