Files
clang-p2996/openmp/libomptarget/test/offloading/global_constructor.cpp
Joseph Huber f8ffac5987 [OpenMP] Enable new driver tests for AMDGPU
This patch enables running the new driver tests for AMDGPU. Previously
this was disabled because some tests failed. This was only because the
new driver tests hadn't been listed as unsupported or expected to fail.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D119240
2022-02-08 09:55:29 -05:00

24 lines
530 B
C++

// RUN: %libomptarget-compilexx-generic && %libomptarget-run-generic | %fcheck-generic
// Fails in DAGToDAG on an address space problem
// UNSUPPORTED: amdgcn-amd-amdhsa
// UNSUPPORTED: amdgcn-amd-amdhsa-newDriver
#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");
}