Fix ICE in call to out-of-line __sync_lock_test_and_set

2011-12-04 Thread Richard Sandiford
I think I must have messed up my previous testing of MIPS16 __sync stuff. This patch fixes one bit of fallout, as seen in ia64-sync-1.c. If the result of sync_lock_test_and_set is unused, the optab helper routine maybe_emit_sync_lock_test_and_set gets called with a target of const0_rtx. If the

Re: Fix ICE in call to out-of-line __sync_lock_test_and_set

2011-12-04 Thread Richard Henderson
On 12/04/2011 03:07 AM, Richard Sandiford wrote: * optabs.c (maybe_emit_sync_lock_test_and_set): Pass a null target to emit_library_call_value. (expand_atomic_compare_and_swap): Likewise. Ok. r~