aarch64: Tweak atomic-inst-cas.c options
authorRichard Sandiford <richard.sandiford@arm.com>
Wed, 16 Feb 2022 10:21:14 +0000 (10:21 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Wed, 16 Feb 2022 10:21:14 +0000 (10:21 +0000)
atomic-inst-cas.c has code to skip __atomic_compare_exchange_n
calls for invalid memory orderings, but -Winvalid-memory-model
applies before the dead code is removed (which is the right
behaviour IMO).  This patch therefore suppresses the warning
for this test.

gcc/testsuite/
* gcc.target/aarch64/atomic-inst-cas.c: Add
-Wno-invalid-memory-model.

gcc/testsuite/gcc.target/aarch64/atomic-inst-cas.c

index f6f2892..0b4533a 100644 (file)
@@ -1,5 +1,7 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -march=armv8-a+lse" } */
+/* -Winvalid-memory-model warnings are issued before the dead invalid calls
+   are removed.  */
+/* { dg-options "-O2 -march=armv8-a+lse -Wno-invalid-memory-model" } */
 
 /* Test ARMv8.1-A CAS instruction.  */