aboutsummaryrefslogtreecommitdiffstats
path: root/compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/compile.c b/compile.c
index 5c6c5f5f32..b361da1164 100644
--- a/compile.c
+++ b/compile.c
@@ -1968,6 +1968,9 @@ remove_unreachable_chunk(LINK_ELEMENT *i)
break;
}
}
+ else if (i->type == ISEQ_ELEMENT_LABEL) {
+ if (((LABEL *)i)->refcnt > 0) break;
+ }
else break;
REMOVE_ELEM(i);
removed = 1;