This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: Use fixup_fallthru_exit_predecessor only for !HAVE_prologue targets, and only after reload
- From: amylaar at spamcop dot net (Joern Rennecke)
- To: dje at watson dot ibm dot com (David Edelsohn)
- Cc: gcc-patches at gcc dot gnu dot org, joern dot rennecke at superh dot com
- Date: Tue, 15 Jun 2004 01:32:09 +0100 (BST)
- Subject: Re: RFA: Use fixup_fallthru_exit_predecessor only for !HAVE_prologue targets, and only after reload
> Joern,
>
> With your patch I am seeing a large number of new testcase
> failures on PowerPC of the form:
>
> /gcc/dje/src/gcc/testsuite/gcc.c-torture/compile/20020309-2.c:16: internal compiler error: in fixup_reorder_chain, at cfglayout.c:740
What are the exact options? I've tried this with the powerpc-eabisim
configuration, and -O0, -O1 and -O2 succeed. -O3 segfaults in the
label_for_bb call in line 735 (what gdb thinks) / 736 (actual).
When I make the obvious fix for this segfault, it goes on to an ICE
in line 740.
2004-06-15 J"orn Rennecke <joern.rennecke@superh.com>
* cfglayout.c (fixup_reorder_chain): Handle case where the
destination od E_TAKEN is EXIT_BLOCK_PTR.
Index: cfglayout.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfglayout.c,v
retrieving revision 1.60
diff -p -r1.60 cfglayout.c
*** cfglayout.c 14 Jun 2004 12:09:07 -0000 1.60
--- cfglayout.c 14 Jun 2004 23:15:59 -0000
*************** fixup_reorder_chain (void)
*** 733,745 ****
/* Otherwise we can try to invert the jump. This will
basically never fail, however, keep up the pretense. */
else if (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);
continue;
--- 733,747 ----
/* Otherwise we can try to invert the jump. This will
basically never fail, however, keep up the pretense. */
else if (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);
continue;