Daily bump.
[official-gcc.git] / libgomp / testsuite / libgomp.c / simd-2.c
blob0e3f17bae0bd484fdbe68b16065d144a5916358e
1 /* { dg-do run } */
2 /* { dg-additional-options "-msse2" { target sse2_runtime } } */
3 /* { dg-additional-options "-mavx" { target avx_runtime } } */
5 extern void abort ();
6 __UINTPTR_TYPE__ arr[1027];
8 __attribute__((noinline, noclone)) void
9 foo ()
11 int i, v;
12 #pragma omp simd private (v) safelen(16)
13 for (i = 0; i < 1027; i++)
14 arr[i] = (__UINTPTR_TYPE__) &v;
17 int
18 main ()
20 int i, j, cnt = 0;
21 __UINTPTR_TYPE__ arr2[16];
22 foo ();
23 for (i = 0; i < 1027; i++)
25 for (j = 0; j < cnt; j++)
26 if (arr[i] == arr2[j])
27 break;
28 if (j != cnt)
29 continue;
30 if (cnt == 16)
31 abort ();
32 arr2[cnt++] = arr[i];
34 return 0;