Update 'Q' constraint documentation.
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-c-c++-common / acc_free-pr92503-3-2.c
blob9f4504809ebf83cbde42a811a80fda46b9d51159
1 /* Verify that we refuse 'acc_free', inside 'host_data', after '#pragma acc enter data create'. */
3 /* { dg-skip-if "" { *-*-* } { "*" } { "-DACC_MEM_SHARED=0" } } */
5 #include <stdio.h>
6 #include <stdlib.h>
7 #include <openacc.h>
9 int
10 main ()
12 const int N = 108;
14 char *h = (char *) malloc (N);
15 #pragma acc enter data create (h[0:N - 2])
17 #pragma acc host_data use_device (h)
19 fprintf (stderr, "CheCKpOInT\n");
20 acc_free (h);
23 return 0;
26 /* { dg-output "CheCKpOInT(\n|\r\n|\r).*" }
27 { dg-output "refusing to free device memory space at \[0-9a-fA-FxX\]+ that is still mapped at \\\[\[0-9a-fA-FxX\]+,\\\+106\\\]" }
28 { dg-shouldfail "" } */