PR c++/86342 - -Wdeprecated-copy and system headers.
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-c-c++-common / lib-54.c
blobfc221f471167fdb7ac8d82d42bdc8a1b04d4c5d8
1 /* Exercise acc_map_data with data size of zero 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 unsigned char *h;
14 void *d;
16 h = (unsigned char *) malloc (N);
18 d = acc_malloc (N);
20 fprintf (stderr, "CheCKpOInT\n");
21 acc_map_data (h, d, 0);
23 acc_unmap_data (h);
25 acc_free (d);
27 free (h);
29 return 0;
32 /* { dg-output "CheCKpOInT(\n|\r\n|\r).*" } */
33 /* { dg-output "\\\[\[0-9a-fA-FxX\]+,\\\+0\\\]->\\\[\[0-9a-fA-FxX\]+,\\\+0\\\] is a bad map" { target openacc_nvidia_accel_selected } } */
34 /* { dg-output "cannot map data on shared-memory system" { target openacc_host_selected } } */
35 /* { dg-shouldfail "" } */