This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix crash of debug_bb_n on 0 and 1 in RTL mode
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 20 Jan 2012 22:35:10 +0100
- Subject: Fix crash of debug_bb_n on 0 and 1 in RTL mode
Long overdue, and regression from when ENTRY_BLOCK and EXIT_BLOCK were handled
differently so applied on mainline/4.6/4.5 branches after testing on x86-linux.
2012-01-20 Eric Botcazou <ebotcazou@adacore.com>
* cfgrtl.c (rtl_dump_bb): Do not dump insns for {ENTRY|EXIT}_BLOCK.
--
Eric Botcazou
Index: cfgrtl.c
===================================================================
--- cfgrtl.c (revision 183348)
+++ cfgrtl.c (working copy)
@@ -1674,9 +1674,10 @@ rtl_dump_bb (basic_block bb, FILE *outf,
putc ('\n', outf);
}
- for (insn = BB_HEAD (bb), last = NEXT_INSN (BB_END (bb)); insn != last;
- insn = NEXT_INSN (insn))
- print_rtl_single (outf, insn);
+ if (bb->index != ENTRY_BLOCK && bb->index != EXIT_BLOCK)
+ for (insn = BB_HEAD (bb), last = NEXT_INSN (BB_END (bb)); insn != last;
+ insn = NEXT_INSN (insn))
+ print_rtl_single (outf, insn);
if (df)
{