Update 'Q' constraint documentation.
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-c-c++-common / lib-58.c
blobfedda77004b0da3a5fcef7808341020446187751
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 (0);
28 acc_free (d);
30 free (h);
32 return 0;
35 /* { dg-output "CheCKpOInT(\n|\r\n|\r).*" } */
36 /* { dg-output "\[^\n\r]* 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 "" } */