[Transforms] Silence a warning in SROA.cpp (NFC)
[llvm-project.git] / offload / test / offloading / offloading_success.c
blobf849cb4cfba79f3b7319987bda3a1f4080017a55
1 // RUN: %libomptarget-compile-run-and-check-generic
3 #include <omp.h>
4 #include <stdio.h>
6 int main(void) {
7 int isHost = -1;
9 #pragma omp target map(from : isHost)
10 { isHost = omp_is_initial_device(); }
12 if (isHost < 0) {
13 printf("Runtime error, isHost=%d\n", isHost);
16 // CHECK: Target region executed on the device
17 printf("Target region executed on the %s\n", isHost ? "host" : "device");
19 return isHost;