From 1ff2fd21dc21c02b1da0e31b4a39ec782a371a0a Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 16 Nov 2011 08:40:46 +1030 Subject: [PATCH] re PR rtl-optimization/51051 (build fails on cris-elf building libstdc++-v3) PR rtl-optimization/51051 PR bootstrap/51086 * function.c (thread_prologue_and_epilogue_insns): Guard emitting return with single_succ_p test. From-SVN: r181391 --- gcc/ChangeLog | 7 +++++++ gcc/function.c | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2f0aedc70f8..a7fb9ea48a6 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 0ee69ef22b6..664858a29e3 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.30.2