From 3c4ca362de0b35eb611eb18f5ed82342a67899a7 Mon Sep 17 00:00:00 2001 From: amodra Date: Tue, 15 Nov 2011 22:10:46 +0000 Subject: [PATCH] PR rtl-optimization/51051 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 | 7 +++++++ gcc/function.c | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2f0aedc..a7fb9ea 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2011-11-16 Alan Modra + + 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 * config/epiphany/epiphany.md (movcc): Fix code to diff --git a/gcc/function.c b/gcc/function.c index 0ee69ef..664858a 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -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); -- 2.7.4