diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/s390/pr81534.c')
-rw-r--r-- | gcc/testsuite/gcc.target/s390/pr81534.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/s390/pr81534.c b/gcc/testsuite/gcc.target/s390/pr81534.c new file mode 100644 index 00000000000..0e1bd99b9cb --- /dev/null +++ b/gcc/testsuite/gcc.target/s390/pr81534.c @@ -0,0 +1,17 @@ +/* PR81534 This testcase used to fail because the HI/QI + "atomic_fetch_<atomic><mode>" expander accepted symbolic references + and emitted CAS patterns whose insn definition rejected them. */ + +/* { dg-do compile } */ +/* { dg-options "-O2 -march=zEC12" } */ + +struct { + short b; + long c; +} a = {}; + +void +d () +{ + __atomic_fetch_add(&a.b, 0, 5); +} |