* c-c++-common/Wrestrict.c (test_strcpy_range): Revert latest change.
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-c-c++-common / lib-48.c
blobafa137ff098bf49eeb66ca24dc809a9f8cf0ab23
1 /* Exercise acc_update_self with a size zero data mapping on nvidia targets. */
3 /* { dg-do run { target openacc_nvidia_accel_selected } } */
5 #include <stdio.h>
6 #include <string.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;
16 void *d;
18 h = (unsigned char *) malloc (N);
20 for (i = 0; i < N; i++)
22 h[i] = i;
25 d = acc_copyin (h, N);
26 if (!d)
27 abort ();
29 memset (&h[0], 0, N);
31 fprintf (stderr, "CheCKpOInT\n");
32 acc_update_self (h, 0);
34 for (i = 0; i < N; i++)
36 if (h[i] != i)
37 abort ();
40 acc_delete (h, N);
42 free (h);
44 return 0;
47 /* { dg-output "CheCKpOInT(\n|\r\n|\r).*" } */
48 /* { dg-output "\\\[\[0-9a-fA-FxX\]+,0\\\] is not mapped" } */
49 /* { dg-shouldfail "" } */