Improve atomic store implementation on hppa-linux.
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-c-c++-common / vector-loop.c
blob807347f68884d4916bef4eee4339b3b078d25c2a
1 /* { dg-do run } */
3 #include <stdlib.h>
5 #define N 1024
7 unsigned int a[N];
8 unsigned int b[N];
9 unsigned int c[N];
10 unsigned int n = N;
12 int
13 main (void)
15 for (unsigned int i = 0; i < n; ++i)
17 a[i] = i % 3;
18 b[i] = i % 5;
21 #pragma acc parallel vector_length (32) copyin (a,b) copyout (c)
23 #pragma acc loop vector
24 for (unsigned int i = 0; i < n; i++)
25 c[i] = a[i] + b[i];
28 for (unsigned int i = 0; i < n; ++i)
29 if (c[i] != (i % 3) + (i % 5))
30 abort ();
32 return 0;