1 // RUN: %libomptarget-compile-generic -fopenmp-version=51 2 // RUN: %libomptarget-run-generic 2>&1 \ 3 // RUN: | %fcheck-generic 4 5 // REQUIRES: unified_shared_memory 6 7 8 #include <stdio.h> 9 10 // The runtime considers unified shared memory to be always present. 11 #pragma omp requires unified_shared_memory 12 main()13int main() { 14 int i; 15 16 // CHECK-NOT: Libomptarget 17 #pragma omp target data map(alloc: i) 18 #pragma omp target map(present, alloc: i) 19 ; 20 21 // CHECK: i is present 22 fprintf(stderr, "i is present\n"); 23 24 // CHECK-NOT: Libomptarget 25 #pragma omp target map(present, alloc: i) 26 ; 27 28 // CHECK: is present 29 fprintf(stderr, "i is present\n"); 30 31 return 0; 32 } 33