aboutsummaryrefslogtreecommitdiffhomepage
path: root/c/c.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-10-24 13:50:11 +0200
committerlemon <lsof@mailbox.org>2025-10-24 13:50:11 +0200
commit968f5211d2c64f01c02d416a9ca197b1f43dfc2a (patch)
tree81c9f59ba99dfc4283329acd171da2b5b230fc66 /c/c.c
parentb98f2042ca41a5c974b8908d4faf606efa897fa8 (diff)
codegen fixes, propagate terminate
Diffstat (limited to 'c/c.c')
-rw-r--r--c/c.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/c/c.c b/c/c.c
index 5ba6c2e..6ae7ee7 100644
--- a/c/c.c
+++ b/c/c.c
@@ -3712,7 +3712,12 @@ stmt(struct comp *cm, struct function *fn)
putbranch(fn, begin);
freearena(&atmpp);
} else if (!terminates) putbranch(fn, begin);
- useblk(fn, fl);
+ if (fl->npred > 0) {
+ useblk(fn, fl);
+ } else {
+ freeblk(fn, fl);
+ terminates = 1;
+ }
}
envup(cm);
break;