diff --git a/gcc/reorg.c b/gcc/reorg.c index 98b7f299060..40d3702394e 100644 --- a/gcc/reorg.c +++ b/gcc/reorg.c @@ -3266,7 +3266,11 @@ fill_slots_from_thread (insn, condition, thread, opposite_thread, likely, { update_block (trial, thread); if (trial == thread) - thread = next_active_insn (thread); + { + thread = next_active_insn (thread); + if (new_thread == trial) + new_thread = thread; + } delete_insn (trial); }