Improve atomic store implementation on hppa-linux.
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-c-c++-common / refcounting-1.c
blob4e6d06d48d5c902a3334deae69ae87501b7d6f75
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 #pragma acc exit data delete(s.a)
24 #pragma acc exit data delete(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;