Update 'Q' constraint documentation.
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-c-c++-common / lib-15.c
blob50c17011fe794b881a38ec15c89f830fa3e5365b
1 /* Check acc_is_present and acc_copyout. */
3 /* { dg-do run { target openacc_nvidia_accel_selected } } */
5 #include <stdlib.h>
6 #include <openacc.h>
8 int
9 main (int argc, char **argv)
11 const int N = 256;
12 int i;
13 unsigned char *h;
15 h = (unsigned char *) malloc (N);
17 for (i = 0; i < N; i++)
19 h[i] = i;
22 (void) acc_copyin (h, N);
24 acc_copyout (h, N);
26 for (i = 0; i < N; i++)
28 if (acc_is_present (h + i, 1) != 0)
29 abort ();
32 free (h);
34 return 0;