+2001-09-15 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * reorg.c (fill_slots_from_thread): After call to
+ steal_delay_list_from_target, update own_thread as new_thread may
+ have branched.
+
2001-09-14 Neil Booth <neil@daikokuya.demon.co.uk>
* cpperror.c (print_location): Take line and column, for
/* If this is the `true' thread, we will want to follow the jump,
so we can only do this if we have taken everything up to here. */
if (thread_if_true && trial == new_thread)
- delay_list
- = steal_delay_list_from_target (insn, condition, PATTERN (trial),
- delay_list, &set, &needed,
- &opposite_needed, slots_to_fill,
- pslots_filled, &must_annul,
- &new_thread);
+ {
+ delay_list
+ = steal_delay_list_from_target (insn, condition, PATTERN (trial),
+ delay_list, &set, &needed,
+ &opposite_needed, slots_to_fill,
+ pslots_filled, &must_annul,
+ &new_thread);
+ /* If we owned the thread and are told that it branched
+ elsewhere, make sure we own the thread at the new location. */
+ if (own_thread && trial != new_thread)
+ own_thread = own_thread_p (new_thread, new_thread, 0);
+ }
else if (! thread_if_true)
delay_list
= steal_delay_list_from_fallthrough (insn, condition,