1 // RUN: %libomptarget-compile-run-and-check-x86_64-pc-linux-gnu
2 // RUN: %libomptarget-compile-x86_64-pc-linux-gnu -DUNUSED -Wall -Werror
4 // only run for x86_64 host offloading:
5 // REQUIRES: x86_64-pc-linux-gnu
13 // Test if it is OK to leave the variants unused in the header
15 int host
= omp_is_initial_device();
17 #pragma omp target map(tofrom : device)
18 { device
= omp_is_initial_device(); }
20 printf("omp_is_initial_device() returned false on host\n");
24 printf("omp_is_initial_device() returned true on device\n");
30 printf("%s\n", errors
? "FAIL" : "PASS");