fill_simple_delay_slots would call optimize_skip with a conditional return, which would cause a segfault when it calls next_active_insn (RETURN).
Other places in reorg.c check that they are not operating on a return insn before doing branch-insn only processing, so I added this check there too. Bootstrapped on i686-pc-linux-gnu. Committed as obviuous.
2012-11-05 Joern Rennecke <joern.renne...@embecosm.com> * reorg.c (fill_simple_delay_slots): Avoid calling optimize_skip with a return instruction. Index: reorg.c =================================================================== --- reorg.c (revision 2686) +++ reorg.c (revision 2687) @@ -2196,7 +2196,8 @@ fill_simple_delay_slots (int non_jumps_p if (slots_filled != slots_to_fill && delay_list == 0 && JUMP_P (insn) - && (condjump_p (insn) || condjump_in_parallel_p (insn))) + && (condjump_p (insn) || condjump_in_parallel_p (insn)) + && !ANY_RETURN_P (JUMP_LABEL (insn))) { delay_list = optimize_skip (insn); if (delay_list)