This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch for PR target/31733 (in cfgrtl.c)
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 9 May 2007 14:29:32 -0700 (PDT)
- Subject: Patch for PR target/31733 (in cfgrtl.c)
- Reply-to: sje at cup dot hp dot com
PR target/31733 is an ICE that was happening on IA64. It stopped
happening with SVN version r124217, but that change didn't intentionally
fix the bug, it just made it latent. The code where we ICE is trying to
verify that a jump is followed by a barrier, the ICE was caused by the
fact that there was a deleted instruction (a deleted label to be
precise) between the jump and the barrier. I think this is OK, so I
changed the code to skip past deleted instructions and then check for a
barrier.
Tested on IA64 HP-UX and Linux with no regressions. OK to checkin?
Steve Ellcey
sje@cup.hp.com
2007-05-09 Steve Ellcey <sje@cup.hp.com>
PR target/31733
* cfgrtl.c (rtl_verify_flow_info): Skip deleted instructions.
Index: cfgrtl.c
===================================================================
--- cfgrtl.c (revision 124564)
+++ cfgrtl.c (working copy)
@@ -2045,9 +2045,14 @@ rtl_verify_flow_info (void)
}
if (JUMP_P (x)
- && returnjump_p (x) && ! condjump_p (x)
- && ! (NEXT_INSN (x) && BARRIER_P (NEXT_INSN (x))))
+ && returnjump_p (x) && ! condjump_p (x))
+ {
+ rtx next = NEXT_INSN (x);
+ while (next && INSN_DELETED_P (next))
+ next = NEXT_INSN (next);
+ if (! (next && BARRIER_P (next)))
fatal_insn ("return not followed by barrier", x);
+ }
if (curr_bb && x == BB_END (curr_bb))
curr_bb = NULL;
}