This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/16014] [3.5 Regression] ICE in label_for_bb at cfglayout.c:175
- From: "joern dot rennecke at superh dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Jun 2004 13:27:59 -0000
- Subject: [Bug rtl-optimization/16014] [3.5 Regression] ICE in label_for_bb at cfglayout.c:175
- References: <20040616081826.16014.rguenth@tat.physik.uni-tuebingen.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From joern dot rennecke at superh dot com 2004-06-16 13:27 -------
Subject: Re: [3.5 Regression] ICE in label_for_bb at cfglayout.c:175
> > 2004-06-16 J"orn Rennecke <joern.rennecke@superh.com>
> >
> > * cfglayout.c (fixup_reorder_chain): Handle case where the
> > destination of E_FALL is EXIT_BLOCK_PTR.
>
>
> No, it does not help (segfault with same backtrace).
Sorry, I got the implementation wrong. Here is a fix I have verified with
the shortened testcase:
2004-06-16 J"orn Rennecke <joern.rennecke@superh.com>
* cfglayout.c (fixup_reorder_chain): Handle case where the
destination of E_FALL is EXIT_BLOCK_PTR.
Index: cfglayout.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfglayout.c,v
retrieving revision 1.61
diff -p -r1.61 cfglayout.c
*** cfglayout.c 15 Jun 2004 11:58:40 -0000 1.61
--- cfglayout.c 16 Jun 2004 13:26:09 -0000
*************** fixup_reorder_chain (void)
*** 712,724 ****
if (note
&& INTVAL (XEXP (note, 0)) < REG_BR_PROB_BASE / 2
&& invert_jump (bb_end_insn,
! label_for_bb (e_fall->dest), 0))
{
#ifdef ENABLE_CHECKING
if (!could_fall_through (e_taken->src, e_taken->dest))
abort ();
#endif
- e_fall->flags &= ~EDGE_FALLTHRU;
e_taken->flags |= EDGE_FALLTHRU;
update_br_prob_note (bb);
e = e_fall, e_fall = e_taken, e_taken = e;
--- 712,726 ----
if (note
&& INTVAL (XEXP (note, 0)) < REG_BR_PROB_BASE / 2
&& invert_jump (bb_end_insn,
! (e_fall->dest == EXIT_BLOCK_PTR
! ? NULL_RTX
! : label_for_bb (e_fall->dest)), 0))
{
+ e_fall->flags &= ~EDGE_FALLTHRU;
#ifdef ENABLE_CHECKING
if (!could_fall_through (e_taken->src, e_taken->dest))
abort ();
#endif
e_taken->flags |= EDGE_FALLTHRU;
update_br_prob_note (bb);
e = e_fall, e_fall = e_taken, e_taken = e;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16014