brintos

brintos / llvm-project-archived public Read only

0
0
Text · 399 B · eba7904 Raw
27 lines · cpp
1// RUN: %libomptarget-compilexx-run-and-check-generic2// RUN: %libomptarget-compileoptxx-run-and-check-generic3 4#include <cassert>5#include <iostream>6 7int main(int argc, char *argv[]) {8  int i = 0, j = 0;9 10#pragma omp target map(tofrom : i, j) nowait11  {12    i = 1;13    j = 2;14  }15 16#pragma omp taskwait17 18  assert(i == 1);19  assert(j == 2);20 21  std::cout << "PASS\n";22 23  return 0;24}25 26// CHECK: PASS27