]> git.ipfire.org Git - thirdparty/gcc.git/blob - libgomp/testsuite/libgomp.oacc-c-c++-common/lib-15.c
Merge current set of OpenACC changes from gomp-4_0-branch.
[thirdparty/gcc.git] / libgomp / testsuite / libgomp.oacc-c-c++-common / lib-15.c
1 /* { dg-do run } */
2
3 #include <stdlib.h>
4 #include <openacc.h>
5
6 int
7 main (int argc, char **argv)
8 {
9 const int N = 256;
10 int i;
11 unsigned char *h;
12
13 h = (unsigned char *) malloc (N);
14
15 for (i = 0; i < N; i++)
16 {
17 h[i] = i;
18 }
19
20 (void) acc_copyin (h, N);
21
22 acc_copyout (h, N);
23
24 for (i = 0; i < N; i++)
25 {
26 if (acc_is_present (h + i, 1) != 0)
27 abort ();
28 }
29
30 free (h);
31
32 return 0;
33 }