OSDN Git Service

PR rtl-optimization/51051
authoramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 15 Nov 2011 22:10:46 +0000 (22:10 +0000)
committeramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 15 Nov 2011 22:10:46 +0000 (22:10 +0000)
PR bootstrap/51086
* function.c (thread_prologue_and_epilogue_insns): Guard
emitting return with single_succ_p test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181391 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/function.c

index 2f0aedc..a7fb9ea 100644 (file)
@@ -1,3 +1,10 @@
+2011-11-16  Alan Modra  <amodra@gmail.com>
+
+       PR rtl-optimization/51051
+       PR bootstrap/51086
+       * function.c (thread_prologue_and_epilogue_insns): Guard
+       emitting return with single_succ_p test.
+
 2011-11-15  Joern Rennecke  <joern.rennecke@embecosm.com>
 
        * config/epiphany/epiphany.md (mov<mode>cc): Fix code to
index 0ee69ef..664858a 100644 (file)
@@ -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);