Remove xfail for hppa*-*-hpux* from stdatomic-flag.c and stdatomic-flag-2.c
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-c++ / this.C
blob510c690cf871baa5354aad7f7cd4e3ee452ba12b
1 #include <cstdlib>
2 #include <iostream>
3 using namespace std;
5 class test {
6   public:
7   int a;
9   test ()
10   {
11     a = -1;
12 #pragma acc enter data copyin (this[0:1])
13   }
15   ~test ()
16   {
17 #pragma acc exit data delete (this[0:1])
18   }
20   void set (int i)
21   {
22     a = i;
23 #pragma acc update device (this[0:1])
24   }
26   int get ()
27   {
28 #pragma acc update host (this[0:1])
29     return a;
30   }
33 int
34 main ()
36   test t;
38   t.set (4);
39   if (t.get () != 4)
40     abort ();
42   return 0;