This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix crash in rtl verifier
- From: Andreas Schwab <schwab at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 12 Dec 2008 13:28:43 +0100
- Subject: Fix crash in rtl verifier
While hunting down another bug I experienced a crash in
rtl_verify_flow_info_1: a BARRIER insn doesn't have a bb pointer.
Although the crash does not happen any more with the specific test case
I used, this still looks obvious to me, so I checked it in.
Andreas.
2008-12-12 Andreas Schwab <schwab@suse.de>
* cfgrtl.c (rtl_verify_flow_info_1): Don't apply BLOCK_FOR_INSN on
a BARRIER insn.
Index: cfgrtl.c
===================================================================
--- cfgrtl.c (revision 142707)
+++ cfgrtl.c (working copy)
@@ -1731,7 +1731,8 @@ rtl_verify_flow_info_1 (void)
}
FOR_BB_INSNS (bb, insn)
- if (BLOCK_FOR_INSN (insn) != bb)
+ if (!BARRIER_P (insn)
+ && BLOCK_FOR_INSN (insn) != bb)
{
error ("insn %d basic block pointer is %d, should be %d",
INSN_UID (insn),
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."