OpenACC documentation updates.
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-c / lib-58.c
blob9d6e27d89e95e95f0f98986556b6506a9822e32e
1 /* { dg-do run } */
3 #include <stdlib.h>
4 #include <openacc.h>
6 int
7 main (int argc, char **argv)
9 const int N = 256;
10 unsigned char *h;
11 void *d;
13 h = (unsigned char *) malloc (N);
15 d = acc_malloc (N);
17 acc_map_data (h, d, N);
19 acc_unmap_data (0);
21 acc_free (d);
23 free (h);
25 return 0;
28 /* { dg-shouldfail "libgomp: \(nil\) is not a mapped block" } */