aboutsummaryrefslogtreecommitdiff
path: root/gcc/loop.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1995-09-15 17:52:15 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1995-09-15 17:52:15 -0400
commit89724a5a45fca60f9b972a99c3349e3d4344c59e (patch)
treeb96b9f54520104dea98992bdab29e658c2afcdaa /gcc/loop.c
parent5f81043f512950a722e1e71082afb05ed6c90f86 (diff)
downloadgcc-89724a5a45fca60f9b972a99c3349e3d4344c59e.zip
gcc-89724a5a45fca60f9b972a99c3349e3d4344c59e.tar.gz
gcc-89724a5a45fca60f9b972a99c3349e3d4344c59e.tar.bz2
(find_and_verify_loops): When moving exit blocks out of the loop,
verify that the target of P is within the current loop. From-SVN: r10364
Diffstat (limited to 'gcc/loop.c')
-rw-r--r--gcc/loop.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/loop.c b/gcc/loop.c
index f48a42a..6f21104 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -2366,6 +2366,12 @@ find_and_verify_loops (f)
}
}
+ /* Make sure that the target of P is within the current loop. */
+
+ if (JUMP_LABEL (p)
+ && uid_loop_num[INSN_UID (JUMP_LABEL (p))] != this_loop_num)
+ outer_loop = this_loop_num;
+
/* If we stopped on a JUMP_INSN to the next insn after INSN,
we have a block of code to try to move.