brintos

brintos / llvm-project-archived public Read only

0
0
Text · 553 B · c1fbbae Raw
26 lines · c
1// RUN: %libomptarget-compile-generic2// RUN: %libomptarget-run-generic 2>&1 \3// RUN: | %fcheck-generic4 5#include <stdio.h>6 7int main() {8  int i;9 10#pragma omp target enter data map(alloc : i)11 12  // i isn't present at the end of the target data region, but the "present"13  // modifier is only checked at the beginning of a region.14#pragma omp target data map(present, alloc : i)15  {16#pragma omp target exit data map(delete : i)17  }18 19  // CHECK-NOT: omptarget20  // CHECK: success21  // CHECK-NOT: omptarget22  fprintf(stderr, "success\n");23 24  return 0;25}26