Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / pr103721-2.c
blobe059b1cfc2df81212933a42ca07fbc8f7ee35ac7
1 // { dg-do run }
2 // { dg-require-effective-target thread_fence }
3 // { dg-options "-O2" }
5 extern void abort ();
6 struct S { int x; } a[10];
7 struct S *b;
9 int
10 main ()
12 int i, j = 0;
13 struct S *q = a;
15 for (i = 100; --i > 0; )
17 struct S *p;
18 j++;
19 if (j >= 10)
20 j = 0;
21 p = &a[j];
23 if (p == q)
24 abort ();
25 __atomic_thread_fence (__ATOMIC_SEQ_CST);
26 q = p;
28 return 0;