function.c (thread_prologue_and_epilogue_insns): Do not crash on empty epilogue sequences.

* function.c (thread_prologue_and_epilogue_insns): Do not crash
	on empty epilogue sequences.

From-SVN: r168463
This commit is contained in:
Ulrich Weigand 2011-01-04 12:20:45 +00:00 committed by Ulrich Weigand
parent d28139df87
commit 55c623b524
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2011-01-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
* function.c (thread_prologue_and_epilogue_insns): Do not crash
on empty epilogue sequences.
2011-01-04 Joseph Myers <joseph@codesourcery.com>
* config/vxworks.opt (Bdynamic, Bstatic, Xbind-lazy, Xbind-now,

View File

@ -5461,7 +5461,8 @@ thread_prologue_and_epilogue_insns (void)
start_sequence ();
epilogue_end = emit_note (NOTE_INSN_EPILOGUE_BEG);
seq = gen_epilogue ();
emit_jump_insn (seq);
if (seq)
emit_jump_insn (seq);
/* Retain a map of the epilogue insns. */
record_insns (seq, NULL, &epilogue_insn_hash);