blob: d73fe1ad938f334594476dd261dbc59edbd90bd9 [file] [log] [blame]
// RUN: %libomptarget-compilexx-generic && %libomptarget-run-generic | %fcheck-generic
// Fails in DAGToDAG on an address space problem
// UNSUPPORTED: amdgcn-amd-amdhsa
#include <cmath>
#include <cstdio>
const double Host = log(2.0) / log(2.0);
#pragma omp declare target
const double Device = log(2.0) / log(2.0);
#pragma omp end declare target
int main() {
double X;
#pragma omp target map(from : X)
{ X = Device; }
// CHECK: PASS
if (X == Host)
printf("PASS\n");
}