PR c++/86342 - -Wdeprecated-copy and system headers.
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-c-c++-common / kernels-loop-and-seq.c
blob9d9308a4a1f3ad5a05fbd4f526b242d4eef69008
1 #include <stdlib.h>
3 #define N 32
5 unsigned int
6 foo (int n, unsigned int *a)
9 #pragma acc kernels copy (a[0:N])
11 for (int i = 0; i < n; i++)
12 a[i] = 1;
14 a[0] = a[0] + 1;
17 return a[0];
20 int
21 main (void)
23 unsigned int a[N];
24 unsigned res, i;
26 for (i = 0; i < N; ++i)
27 a[i] = i % 4;
29 res = foo (N, a);
30 if (res != 2)
31 abort ();
33 return 0;