Improve atomic store implementation on hppa-linux.
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-c-c++-common / acc_free-pr92503-2.c
blob3f6a8e5717460d12fe3b815d01edeed3f850bfca
1 /* Verify that we refuse 'acc_free', after 'acc_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 void *d = acc_create (h, N - 1);
16 if (!d)
17 abort ();
19 fprintf (stderr, "CheCKpOInT\n");
20 acc_free (d);
22 return 0;
25 /* { dg-output "CheCKpOInT(\n|\r\n|\r).*" }
26 { dg-output "refusing to free device memory space at \[0-9a-fA-FxX\]+ that is still mapped at \\\[\[0-9a-fA-FxX\]+,\\\+107\\\]" }
27 { dg-shouldfail "" } */