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 // UNSUPPORTED: amdgcn-amd-amdhsa-newRTL
6 
7 #include <cmath>
8 #include <cstdio>
9 
10 const double Host = log(2.0) / log(2.0);
11 #pragma omp declare target
12 const double Device = log(2.0) / log(2.0);
13 #pragma omp end declare target
14 
15 int main() {
16   double X;
17 #pragma omp target map(from : X)
18   { X = Device; }
19 
20   // CHECK: PASS
21   if (X == Host)
22     printf("PASS\n");
23 }
24