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