1 /* { dg-do compile } */
2 /* { dg-options "-march=armv8-a+nolse -moutline-atomics" } */
3
4 int b, c, d, e, f, h;
5 short g;
6 int foo (int) __attribute__ ((__const__));
7
8 __attribute__ ((target ("no-outline-atomics")))
9 void
10 bar (void)
11 {
12 while (1)
13 {
14 while (1)
15 {
16 __atomic_load_n (&e, 0);
17 if (foo (2))
18 __sync_val_compare_and_swap (&c, 0, f);
19 b = 1;
20 if (h == e)
21 break;
22 }
23 __sync_val_compare_and_swap (&g, -1, f);
24 }
25 }
26
27 /* { dg-final { scan-assembler-not "bl.*__aarch64_cas2_sync" } } */