PR c++/86342 - -Wdeprecated-copy and system headers.
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-c-c++-common / lib-57.c
blob971a0147f3d2ccbb916fa6d9067560c6a109d818
1 /* { dg-do run } */
3 #include <stdio.h>
4 #include <stdlib.h>
5 #include <openacc.h>
7 int
8 main (int argc, char **argv)
10 const int N = 256;
11 unsigned char *h;
12 void *d;
14 h = (unsigned char *) malloc (N);
16 d = acc_malloc (N);
18 #if ACC_MEM_SHARED
19 fprintf (stderr, "CheCKpOInT\n");
20 #endif
21 acc_map_data (h, d, N);
23 #if !ACC_MEM_SHARED
24 fprintf (stderr, "CheCKpOInT\n");
25 #endif
26 acc_unmap_data (d);
28 acc_free (d);
30 free (h);
32 return 0;
35 /* { dg-output "CheCKpOInT(\n|\r\n|\r).*" } */
36 /* { dg-output "\[0-9a-fA-FxX\]+ is not a mapped block" { target openacc_nvidia_accel_selected } } */
37 /* { dg-output "cannot map data on shared-memory system" { target openacc_host_selected } } */
38 /* { dg-shouldfail "" } */