blob: ab6e3bd0e5fa70bd94fe7bceaa6891211190b4bf [file] [log] [blame]
// RUN: %libomptarget-compile-generic
// RUN: %libomptarget-run-generic 2>&1 \
// RUN: | %fcheck-generic
// REQUIRES: unified_shared_memory
#include <stdio.h>
// The runtime considers unified shared memory to be always present.
#pragma omp requires unified_shared_memory
int main() {
int i;
// CHECK-NOT: omptarget
#pragma omp target data map(alloc : i)
#pragma omp target map(present, alloc : i)
;
// CHECK: i is present
fprintf(stderr, "i is present\n");
// CHECK-NOT: omptarget
#pragma omp target map(present, alloc : i)
;
// CHECK: is present
fprintf(stderr, "i is present\n");
return 0;
}