1 // RUN: %libomptarget-compilexx-generic && %libomptarget-run-generic | %fcheck-generic
2 
3 #include <cmath>
4 #include <cstdio>
5 
6 const double Host = log(2.0) / log(2.0);
7 #pragma omp declare target
8 const double Device = log(2.0) / log(2.0);
9 #pragma omp end declare target
10 
11 int main() {
12   double X;
13 #pragma omp target map(from : X)
14   { X = Device; }
15 
16   // CHECK: PASS
17   if (X == Host)
18     printf("PASS\n");
19 }
20