summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2018-04-16 13:24:29 +0200
committerChristoph Mallon <christoph.mallon@gmx.de>2018-05-31 07:00:55 +0200
commite367adeaba2a943a3d2b691378b80aa0342a3fa1 (patch)
tree0e8247b409195c89d074ac7960374734bf0408e3
parent694810d15570df2be4f91af03c64cbe67d9f28f3 (diff)
Assert that the number of remaining users is sensible before decrementing it.
-rw-r--r--src/firm/ast2firm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/firm/ast2firm.c b/src/firm/ast2firm.c
index cfb9439..dc2292b 100644
--- a/src/firm/ast2firm.c
+++ b/src/firm/ast2firm.c
@@ -4502,6 +4502,7 @@ static jump_target *jump_to_label(label_t *const label)
prepare_label_target(label);
jump_target *tgt = &label->target;
jump_to_target(tgt);
+ assert(label->n_users != 0);
if (--label->n_users == 0) {
enter_jump_target(tgt);
tgt = NULL;