PR c++/86342 - -Wdeprecated-copy and system headers.
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-c-c++-common / lib-23.c
blobfd4dc5971a197c38bd91f2af79e970fdea142142
1 /* Exercise acc_copyin and acc_copyout on nvidia targets. */
3 /* { dg-do run { target openacc_nvidia_accel_selected } } */
5 #include <stdio.h>
6 #include <stdlib.h>
7 #include <openacc.h>
9 int
10 main (int argc, char **argv)
12 const int N = 256;
13 int i;
14 unsigned char *h1, *h2;
16 h1 = (unsigned char *) malloc (N);
18 for (i = 0; i < N; i++)
20 h1[i] = 0xab;
23 (void) acc_copyin (h1, N);
25 h2 = (unsigned char *) malloc (N);
27 for (i = 0; i < N; i++)
29 h2[i] = 0xde;
32 (void) acc_copyin (h2, N);
34 fprintf (stderr, "CheCKpOInT\n");
35 acc_copyout (h1, N + N);
37 free (h1);
38 free (h2);
40 return 0;
43 /* { dg-output "CheCKpOInT(\n|\r\n|\r).*" } */
44 /* { dg-output "\\\[\[0-9a-fA-FxX\]+,256\\\] surrounds2 \\\[\[0-9a-fA-FxX\]+,\\\+512\\\]" } */
45 /* { dg-shouldfail "" } */