summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/s390/pr81534.c
blob: 0e1bd99b9cbaea59d5b7e7dd899cd17583da5ce0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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);
}