If the target doesn't have an atomic_test_and_set pattern, we'd warn
about "mode" being unused.
Tested on mips64-linux-gnu and applied as obvious.
Richard
gcc/
* optabs.c (gen_atomic_test_and_set): Use each argument.
Index: gcc/optabs.c
===================================================================
--- gcc/optabs.c 2012-01-24 19:48:11.000000000 +0000
+++ gcc/optabs.c 2012-01-24 19:48:11.000000000 +0000
@@ -7311,7 +7311,8 @@ maybe_emit_compare_and_swap_exchange_loo
#ifndef HAVE_atomic_test_and_set
#define HAVE_atomic_test_and_set 0
#define CODE_FOR_atomic_test_and_set CODE_FOR_nothing
-#define gen_atomic_test_and_set(x,y,z) (gcc_unreachable (), NULL_RTX)
+#define gen_atomic_test_and_set(x,y,z) \
+ (gcc_unreachable (), (void) (0 && (x) && (y) && (z)), NULL_RTX)
#endif
static rtx