On Mon, Nov 14, 2011 at 07:48:03AM -1000, Richard Henderson wrote:
> On 11/14/2011 04:10 AM, Hans-Peter Nilsson wrote:
> > Looks like all we need is a positive review of
> > <http://gcc.gnu.org/ml/gcc-patches/2011-11/msg01409.html> and a
> > ChangeLog entry to unbreak three or more targets.
> > 
> > Someone with approval rights: pretty please?
> 
> That patch is ok.

Sorry for the bootstrap problems.  I believe the cause is my
extraction of convert_jumps_to_returns and emit_return_for_exit.  The
new HAVE_return code misses a single_succ_p test (covered by the
bitmap_bit_p (&bb_flags, ...) test in the HAVE_simple_return case).

I haven't really looked into what Bernd's fix does.  I know this one
fixes what I broke..

        * function.c (thread_prologue_and_epilogue_insns): Guard
        emitting return with single_succ_p test.

Index: gcc/function.c
===================================================================
--- gcc/function.c      (revision 181188)
+++ gcc/function.c      (working copy)
@@ -6230,7 +6230,8 @@ thread_prologue_and_epilogue_insns (void
              && !active_insn_between (BB_HEAD (last_bb), BB_END (last_bb)))
            convert_jumps_to_returns (last_bb, false, NULL);
 
-         if (EDGE_COUNT (exit_fallthru_edge->src->preds) != 0)
+         if (EDGE_COUNT (last_bb->preds) != 0
+             && single_succ_p (last_bb))
            {
              last_bb = emit_return_for_exit (exit_fallthru_edge, false);
              epilogue_end = returnjump = BB_END (last_bb);

-- 
Alan Modra
Australia Development Lab, IBM

Reply via email to