aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 8c6516b..6015366 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -7211,20 +7211,14 @@ thread_prologue_and_epilogue_insns (f)
seq = gen_sequence ();
end_sequence ();
- /* If optimization is off, and perhaps in an empty function,
- the entry block will have no successors. */
- if (ENTRY_BLOCK_PTR->succ)
- {
- /* Can't deal with multiple successsors of the entry block. */
- if (ENTRY_BLOCK_PTR->succ->succ_next)
- abort ();
+ /* Can't deal with multiple successsors of the entry block
+ at the moment. Function should always have at least one
+ entry point. */
+ if (!ENTRY_BLOCK_PTR->succ || ENTRY_BLOCK_PTR->succ->succ_next)
+ abort ();
- insert_insn_on_edge (seq, ENTRY_BLOCK_PTR->succ);
- inserted = 1;
- }
- else
- set_block_for_new_insns (emit_insn_after (seq, f),
- ENTRY_BLOCK_PTR->succ);
+ insert_insn_on_edge (seq, ENTRY_BLOCK_PTR->succ);
+ inserted = 1;
}
#endif