Files
clang-p2996/offload/test/offloading/bug51982.c
Joseph Huber 4854e25359 [Offload] Re-enable tests that are now passing
Summary:
Some recent patches made these stop failing so the XFAIL now makes the
bots go red.

Fixes https://github.com/llvm/llvm-project/issues/98903
2024-07-23 10:56:55 -05:00

26 lines
512 B
C

// RUN: %libomptarget-compile-generic -O1 && %libomptarget-run-generic
// -O1 to run openmp-opt
// RUN: %libomptarget-compileopt-generic -O1 && %libomptarget-run-generic
int main(void) {
long int aa = 0;
int ng = 12;
int nxyz = 5;
const long exp = ng * nxyz;
#pragma omp target map(tofrom : aa)
for (int gid = 0; gid < nxyz; gid++) {
#pragma omp parallel for
for (unsigned int g = 0; g < ng; g++) {
#pragma omp atomic
aa += 1;
}
}
if (aa != exp) {
return 1;
}
return 0;
}