public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-7261] aarch64: Tweak atomic-inst-cas.c options
@ 2022-02-16 10:21 Richard Sandiford
  0 siblings, 0 replies; only message in thread
From: Richard Sandiford @ 2022-02-16 10:21 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:f31924f72a99eaa9d4d1f7e0579152d8ecc0981e

commit r12-7261-gf31924f72a99eaa9d4d1f7e0579152d8ecc0981e
Author: Richard Sandiford <richard.sandiford@arm.com>
Date:   Wed Feb 16 10:21:14 2022 +0000

    aarch64: Tweak atomic-inst-cas.c options
    
    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.

Diff:
---
 gcc/testsuite/gcc.target/aarch64/atomic-inst-cas.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.target/aarch64/atomic-inst-cas.c b/gcc/testsuite/gcc.target/aarch64/atomic-inst-cas.c
index f6f28922319..0b4533adade 100644
--- a/gcc/testsuite/gcc.target/aarch64/atomic-inst-cas.c
+++ b/gcc/testsuite/gcc.target/aarch64/atomic-inst-cas.c
@@ -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.  */


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-16 10:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-16 10:21 [gcc r12-7261] aarch64: Tweak atomic-inst-cas.c options Richard Sandiford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).