Fix xfail for 32-bit hppa*-*-* in gcc.dg/pr84877.c
[official-gcc.git] / libgomp / testsuite / libgomp.c++ / target-has-device-addr-2.C
blobd9a309d7af4e001e5618ebd09849efd07aa04e3b
1 /* Testing 'has_device_addr' clause on the target construct with reference. */
3 #include <omp.h>
5 int
6 main ()
8   int *dp = (int*)omp_target_alloc (sizeof(int), 0);
10   #pragma omp target is_device_ptr(dp)
11     *dp = 42;
13   int &x = *dp;
15   #pragma omp target has_device_addr(x)
16     x = 24;
18   #pragma omp target has_device_addr(x)
19     if (x != 24)
20       __builtin_abort ();
22   omp_target_free(dp, 0);