(jump_optimize): Fix potential infinite loop.
authorRichard Kenner <kenner@gcc.gnu.org>
Tue, 13 Feb 1996 13:15:42 +0000 (08:15 -0500)
committerRichard Kenner <kenner@gcc.gnu.org>
Tue, 13 Feb 1996 13:15:42 +0000 (08:15 -0500)
From-SVN: r11253

gcc/jump.c

index 2fd8be52cb282d0f96076d2d36dbf2ad0017792b..f668a472bc80a86a5a78c003ac9089bee6c26623 100644 (file)
@@ -1,5 +1,5 @@
 /* Optimize jump instructions, for GNU compiler.
-   Copyright (C) 1987, 88, 89, 91-94, 1995 Free Software Foundation, Inc.
+   Copyright (C) 1987, 88, 89, 91-95, 1996 Free Software Foundation, Inc.b
 
 This file is part of GNU CC.
 
@@ -1505,7 +1505,7 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
                  else if (ultimate && GET_CODE (ultimate) != RETURN)
                    ultimate = XEXP (ultimate, 0);
 
-                 if (ultimate)
+                 if (ultimate && JUMP_LABEL(insn) != ultimate)
                    changed |= redirect_jump (insn, ultimate);
                }
            }