Fix xfail for 32-bit hppa*-*-* in gcc.dg/pr84877.c
[official-gcc.git] / libgomp / testsuite / libgomp.c++ / target-same-name-2-b.C
blob31884ba57ce91973fc5379aaeee5c4cc25388026
1 /* { dg-skip-if "" { *-*-* } } */
2 /* Used by target-same-name-2.c */
4 #include <complex>
6 template<typename T>
7 int
8 test_map ()
10   std::complex<T> a(2, 1), a_check;
11 #pragma omp target map(from : a_check)
12   {
13     a_check = a;
14   }
15   if (a == a_check)
16     return 42;
17   return 0;
20 template<typename T>
21 static int
22 test_map_static ()
24   std::complex<T> a(-4, 5), a_check;
25 #pragma omp target map(from : a_check)
26   {
27     a_check = a;
28   }
29   if (a == a_check)
30     return 442;
31   return 0;
34 int
35 test_b()
37   int res = test_map<float>();
38   if (res != 42)
39     __builtin_abort ();
40   return res;
43 int
44 test_b2()
46   int res = test_map_static<float>();
47   if (res != 442)
48     __builtin_abort ();
49   return res;