From e26a82e41e15d154c070a49bc4afae630eeeae1f Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Wed, 1 Sep 1993 16:20:32 -0700 Subject: (jump_optimize): When optimize conditional jump around unconditional jump, handle case where prev_label can be zero. From-SVN: r5246 --- gcc/jump.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/jump.c b/gcc/jump.c index 4025d8b..229cd86 100644 --- a/gcc/jump.c +++ b/gcc/jump.c @@ -1642,7 +1642,8 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan) rtx prev_uses = prev_nonnote_insn (reallabelprev); rtx prev_label = JUMP_LABEL (insn); - ++LABEL_NUSES (prev_label); + if (prev_label) + ++LABEL_NUSES (prev_label); if (invert_jump (insn, JUMP_LABEL (reallabelprev))) { @@ -1671,7 +1672,7 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan) /* We can now safely delete the label if it is unreferenced since the delete_insn above has deleted the BARRIER. */ - if (--LABEL_NUSES (prev_label) == 0) + if (prev_label && --LABEL_NUSES (prev_label) == 0) delete_insn (prev_label); continue; } -- cgit v1.1