Improve atomic store implementation on hppa-linux.
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-c-c++-common / acc_map_data-host_already-2.c
blobfc804692d1b453c646cc91147b61909d55fbf745
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 = 102;
16 char *h = (char *) malloc (N);
17 assert (h);
18 void *d1 = acc_create (h, N);
19 assert (d1);
21 void *d2 = acc_malloc (N);
22 assert (d2);
23 fprintf (stderr, "CheCKpOInT\n");
24 acc_map_data (h, d2, N);
26 return 0;
30 /* { dg-output "CheCKpOInT(\n|\r\n|\r).*" } */
31 /* { dg-output "host address \\\[\[0-9a-fA-FxX\]+, \\\+102\\\] is already mapped" } */
32 /* { dg-shouldfail "" } */