OSDN Git Service

(jump_optimize): Fix potential infinite loop.
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Feb 1996 13:15:42 +0000 (13:15 +0000)
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Feb 1996 13:15:42 +0000 (13:15 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@11253 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/jump.c

index 2fd8be5..f668a47 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);
                }
            }