fortran: Factor the evaluation of MINLOC/MAXLOC's BACK argument
[official-gcc.git] / libgomp / testsuite / libgomp.c / target-54.c
blobbc4e69b527877d322b3c08dc7ea0a74b79cfc6d2
1 /* { dg-do run } */
2 /* { dg-set-target-env-var OMP_TARGET_OFFLOAD "default" } */
3 /* { dg-set-target-env-var OMP_DISPLAY_ENV "true" } */
5 /* { dg-output ".*OMP_DEFAULT_DEVICE = '0'.*OMP_TARGET_OFFLOAD = 'DEFAULT'.*" } */
7 #include <omp.h>
9 int
10 main ()
12 int x;
13 #pragma omp target map(tofrom:x)
14 x = 5 + omp_is_initial_device ();
16 if (x != 5 + (omp_get_default_device() == omp_get_initial_device()))
17 __builtin_abort ();
19 return 0;