Improve atomic store implementation on hppa-linux.
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-c-c++-common / refcounting-2.c
blob5539fd8d57f305a2ca41e8f256249159f3016546
1 /* Test dynamic unmapping of separate structure members. */
3 /* { dg-skip-if "" { *-*-* } { "-DACC_MEM_SHARED=1" } } */
5 #include <assert.h>
6 #include <openacc.h>
8 struct s
10 char a;
11 char b;
14 int main ()
16 struct s s;
18 #pragma acc enter data create(s.a, s.b)
20 assert (acc_is_present (&s.a, sizeof s.a));
21 assert (acc_is_present (&s.b, sizeof s.b));
23 acc_delete (&s.a, sizeof s.a);
24 acc_delete (&s.b, sizeof s.b);
26 assert (!acc_is_present (&s.a, sizeof s.a));
27 assert (!acc_is_present (&s.b, sizeof s.b));
29 return 0;