1 // RUN: %libomptarget-compile-run-and-check-generic
6 #pragma omp declare target
8 #pragma omp end declare target
13 #pragma omp target enter data map(to : isHost)
16 { isHost
= omp_is_initial_device(); }
17 #pragma omp target update from(isHost)
20 printf("Runtime error, isHost=%d\n", isHost
);
23 #pragma omp target exit data map(delete : isHost)
25 // CHECK: Target region executed on the device
26 printf("Target region executed on the %s\n", isHost
? "host" : "device");