PR c++/86342 - -Wdeprecated-copy and system headers.
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-c-c++-common / lib-17.c
bloba3487e8f5bfc49ab513dde9942be4869b6a8152f
1 /* Check acc_copyout failure with acc_device_nvidia. */
3 /* { dg-do run { target openacc_nvidia_accel_selected } } */
6 #include <stdio.h>
7 #include <stdlib.h>
8 #include <openacc.h>
10 int
11 main (int argc, char **argv)
13 const int N = 256;
14 int i;
15 unsigned char *h;
17 h = (unsigned char *) malloc (N);
19 for (i = 0; i < N; i++)
21 h[i] = i;
24 (void) acc_copyin (h, N);
26 acc_copyout (h, N);
28 fprintf (stderr, "CheCKpOInT\n");
29 acc_copyout (h, N);
31 free (h);
33 return 0;
36 /* { dg-output "CheCKpOInT(\n|\r\n|\r).*" } */
37 /* { dg-output "\\\[\[0-9a-fA-FxX\]+,256\\\] is not mapped" } */
38 /* { dg-shouldfail "" } */