Committed to master.
Best regards,
Oleg Endo
gcc/testsuite/ChangeLog:
PR target/81426
* gcc.target/sh/pr81426.c: New test.
From 2b8f467110315958b67909b5fef81209ec4ce3c6 Mon Sep 17 00:00:00 2001
From: Oleg Endo <[email protected]>
Date: Fri, 3 Jul 2026 15:05:54 +0900
Subject: [PATCH] SH: Add test case for PR81426
gcc/testsuite/ChangeLog:
PR target/81426
* gcc.target/sh/pr81426.c: New test.
---
gcc/testsuite/gcc.target/sh/pr81426.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 gcc/testsuite/gcc.target/sh/pr81426.c
diff --git a/gcc/testsuite/gcc.target/sh/pr81426.c b/gcc/testsuite/gcc.target/sh/pr81426.c
new file mode 100644
index 0000000..0f4c26d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr81426.c
@@ -0,0 +1,16 @@
+/* { dg-do compile { target { atomic_model_soft_gusa_available } } } */
+/* { dg-options "-O2 -fPIC -matomic-model=soft-gusa,strict" } */
+
+inline int a (char *b, char c)
+{
+ __sync_val_compare_and_swap (b, c, 0);
+}
+
+int d(void)
+{
+ while (1)
+ {
+ char e;
+ a(&e, e);
+ }
+}
\ No newline at end of file
--
libgit2 1.9.0