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.
/* { 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. */