1 // --------------------------------------------------
3 // --------------------------------------------------
5 // RUN: %libomptarget-compile-generic \
7 // RUN: %libomptarget-run-fail-generic 2>&1 \
8 // RUN: | %fcheck-generic
10 // --------------------------------------------------
12 // --------------------------------------------------
14 // RUN: %libomptarget-compile-generic \
16 // RUN: %libomptarget-run-fail-generic 2>&1 \
17 // RUN: | %fcheck-generic
24 // CHECK: addr=0x[[#%x,HOST_ADDR:]], size=[[#%u,SIZE:]]
25 fprintf(stderr
, "addr=%p, size=%ld\n", &i
, sizeof i
);
27 // CHECK-NOT: Libomptarget
28 #pragma omp target enter data map(alloc : i)
29 #pragma omp target update CLAUSE(present : i)
30 #pragma omp target exit data map(delete : i)
32 // CHECK: i is present
33 fprintf(stderr
, "i is present\n");
35 // CHECK: Libomptarget message: device mapping required by 'present' motion modifier does not exist for host address 0x{{0*}}[[#HOST_ADDR]] ([[#SIZE]] bytes)
36 // CHECK: Libomptarget fatal error 1: failure of target construct while offloading is mandatory
37 #pragma omp target update CLAUSE(present : i)
39 // CHECK-NOT: i is present
40 fprintf(stderr
, "i is present\n");