Remove xfail for hppa*-*-hpux* from stdatomic-flag.c and stdatomic-flag-2.c
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-c++ / pr71959.C
blobbf27a75c784ab77b56557f49651a6f28d0e8deb9
1 // { dg-additional-sources "pr71959-aux.cc" }
3 // PR lto/71959 ICEd LTO due to mismatch between writing & reading behaviour
5 struct Iter
7   int *cursor;
9   Iter(int *cursor_) : cursor(cursor_) {}
11   int *point() const { return cursor; }
14 #pragma acc routine seq
15 int one () { return 1; }
17 struct Apply
19   static void apply (int (*fn)(), Iter out)
20   { *out.point() = fn (); }
23 int main ()
25   int x;
27 #pragma acc parallel copyout(x)
28   Apply::apply (one, Iter (&x));
30   return x != 1;