From 89724a5a45fca60f9b972a99c3349e3d4344c59e Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Fri, 15 Sep 1995 17:52:15 -0400 Subject: [PATCH] (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 --- gcc/loop.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gcc/loop.c b/gcc/loop.c index f48a42a09302..6f21104abaef 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. -- 2.43.5