PR target/82855
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-c-c++-common / lib-39.c
blob39fc15a32db8431c8b41a920db28654c3158678a
1 /* { dg-do run } */
3 #include <stdio.h>
4 #include <string.h>
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;
14 void *d;
16 h = (unsigned char *) malloc (N);
18 for (i = 0; i < N; i++)
20 h[i] = i;
23 fprintf (stderr, "CheCKpOInT\n");
24 d = acc_present_or_copyin (0, N);
25 if (!d)
26 abort ();
28 memset (&h[0], 0, N);
30 acc_copyout (h, N);
32 for (i = 0; i < N; i++)
34 if (h[i] != i)
35 abort ();
38 free (h);
40 return 0;
43 /* { dg-output "CheCKpOInT(\n|\r\n|\r).*" } */
44 /* { dg-output "\\\[\[^\n\r]*,\\\+256\\\] is a bad range" } */
45 /* { dg-shouldfail "" } */