1 // RUN: %libomptarget-compile-aarch64-unknown-linux-gnu
2 // RUN: %libomptarget-run-fail-aarch64-unknown-linux-gnu 2>&1 \
3 // RUN: | %fcheck-aarch64-unknown-linux-gnu
4 
5 // RUN: %libomptarget-compile-powerpc64-ibm-linux-gnu
6 // RUN: %libomptarget-run-fail-powerpc64-ibm-linux-gnu 2>&1 \
7 // RUN: | %fcheck-powerpc64-ibm-linux-gnu
8 
9 // RUN: %libomptarget-compile-powerpc64le-ibm-linux-gnu
10 // RUN: %libomptarget-run-fail-powerpc64le-ibm-linux-gnu 2>&1 \
11 // RUN: | %fcheck-powerpc64le-ibm-linux-gnu
12 
13 // RUN: %libomptarget-compile-x86_64-pc-linux-gnu
14 // RUN: %libomptarget-run-fail-x86_64-pc-linux-gnu 2>&1 \
15 // RUN: | %fcheck-x86_64-pc-linux-gnu
16 
17 // RUN: %libomptarget-compile-nvptx64-nvidia-cuda
18 // RUN: %libomptarget-run-fail-nvptx64-nvidia-cuda 2>&1 \
19 // RUN: | %fcheck-nvptx64-nvidia-cuda
20 
21 // CHECK: Libomptarget message: explicit extension not allowed: host address specified is 0x{{.*}} (8 bytes), but device allocation maps to host at 0x{{.*}} (8 bytes)
22 // CHECK: Libomptarget error: Call to getOrAllocTgtPtr returned null pointer (device failure or illegal mapping).
23 // CHECK: Libomptarget fatal error 1: failure of target construct while offloading is mandatory
24 
main()25 int main() {
26   int arr[4] = {0, 1, 2, 3};
27 #pragma omp target data map(alloc: arr[0:2])
28 #pragma omp target data map(alloc: arr[1:2])
29   ;
30   return 0;
31 }
32