Improve atomic store implementation on hppa-linux.
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-c-c++-common / acc_map_data-host_already-1.c
blob1fff806613c97bd64ca4c1bb8a985abaed9da123
1 /* Verify that we refuse 'acc_map_data' when the "host address [...] is already
2 mapped". */
4 /* { dg-skip-if "" { *-*-* } { "*" } { "-DACC_MEM_SHARED=0" } } */
6 #include <assert.h>
7 #include <stdio.h>
8 #include <stdlib.h>
9 #include <openacc.h>
11 int
12 main ()
14 const int N = 101;
16 char *h = (char *) malloc (N);
17 assert (h);
18 void *d1 = acc_malloc (N);
19 assert (d1);
20 acc_map_data (h, d1, N);
22 void *d2 = acc_malloc (N);
23 assert (d2);
24 fprintf (stderr, "CheCKpOInT\n");
25 acc_map_data (h, d2, N);
27 return 0;
31 /* { dg-output "CheCKpOInT(\n|\r\n|\r).*" } */
32 /* { dg-output "host address \\\[\[0-9a-fA-FxX\]+, \\\+101\\\] is already mapped" } */
33 /* { dg-shouldfail "" } */