Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / openmp / libomptarget / test / mapping / present / target_data_at_exit.c
blobf4b0af8c3e6749ecc1243a936bda4812a09b2c45
1 // RUN: %libomptarget-compile-generic
2 // RUN: %libomptarget-run-generic 2>&1 \
3 // RUN: | %fcheck-generic
5 #include <stdio.h>
7 int main() {
8 int i;
10 #pragma omp target enter data map(alloc : i)
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)
16 #pragma omp target exit data map(delete : i)
19 // CHECK-NOT: Libomptarget
20 // CHECK: success
21 // CHECK-NOT: Libomptarget
22 fprintf(stderr, "success\n");
24 return 0;