aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/function.c b/gcc/function.c
index c69e18b..68a3f7e 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -5256,7 +5256,18 @@ thread_prologue_and_epilogue_insns (void)
epilogue_done:
if (inserted)
- commit_edge_insertions ();
+ {
+ commit_edge_insertions ();
+
+ /* The epilogue insns we inserted may cause the exit edge to no longer
+ be fallthru. */
+ FOR_EACH_EDGE (e, ei, EXIT_BLOCK_PTR->preds)
+ {
+ if (((e->flags & EDGE_FALLTHRU) != 0)
+ && returnjump_p (BB_END (e->src)))
+ e->flags &= ~EDGE_FALLTHRU;
+ }
+ }
#ifdef HAVE_sibcall_epilogue
/* Emit sibling epilogues before any sibling call sites. */