summary refs log tree commit diff
path: root/mem.c
diff options
context:
space:
mode:
Diffstat (limited to 'mem.c')
-rw-r--r--mem.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mem.c b/mem.c
index 8bde4be..36359a0 100644
--- a/mem.c
+++ b/mem.c
@@ -406,6 +406,11 @@ coalesce(Fn *fn)
 	/* substitute fused slots */
 	for (s=sl; s<&sl[nsl]; s++) {
 		t = &fn->tmp[s->t];
+		/* the visit link is stale,
+		 * reset it before the slot()
+		 * calls below
+		 */
+		t->visit = s-sl;
 		assert(t->ndef == 1 && t->def);
 		if (s->s == s)
 			continue;