(relax_delay_slots): When searching for next CODE_LABEL,
authorJim Wilson <wilson@gcc.gnu.org>
Sat, 25 Feb 1995 02:40:03 +0000 (18:40 -0800)
committerJim Wilson <wilson@gcc.gnu.org>
Sat, 25 Feb 1995 02:40:03 +0000 (18:40 -0800)
use next_real_insn not next_active_insn.

From-SVN: r9075

gcc/reorg.c

index 653c477235c2397627d4d8ea43b4f44e7608bf40..6c72f4c32af730ccf22c505581209842431a13bc 100644 (file)
@@ -3865,7 +3865,12 @@ relax_delay_slots (first)
          /* If this jump goes to another unconditional jump, thread it, but
             don't convert a jump into a RETURN here.  */
          trial = follow_jumps (target_label);
-         trial = prev_label (next_active_insn (trial));
+         /* We use next_real_insn instead of next_active_insn, so that
+            the special USE insns emitted by reorg won't be ignored.
+            If they are ignored, then they will get deleted if target_label
+            is now unreachable, and that would cause mark_target_live_regs
+            to fail.  */
+         trial = prev_label (next_real_insn (trial));
          if (trial == 0 && target_label != 0)
            trial = find_end_label ();