Changeset View
Changeset View
Standalone View
Standalone View
openmp/libomptarget/test/mapping/alloc_fail.c
Show All 12 Lines | |||||
// RUN: %libomptarget-compile-x86_64-pc-linux-gnu | // RUN: %libomptarget-compile-x86_64-pc-linux-gnu | ||||
// RUN: %libomptarget-run-fail-x86_64-pc-linux-gnu 2>&1 \ | // RUN: %libomptarget-run-fail-x86_64-pc-linux-gnu 2>&1 \ | ||||
// RUN: | %fcheck-x86_64-pc-linux-gnu | // RUN: | %fcheck-x86_64-pc-linux-gnu | ||||
// RUN: %libomptarget-compile-nvptx64-nvidia-cuda | // RUN: %libomptarget-compile-nvptx64-nvidia-cuda | ||||
// RUN: %libomptarget-run-fail-nvptx64-nvidia-cuda 2>&1 \ | // RUN: %libomptarget-run-fail-nvptx64-nvidia-cuda 2>&1 \ | ||||
// RUN: | %fcheck-nvptx64-nvidia-cuda | // RUN: | %fcheck-nvptx64-nvidia-cuda | ||||
// RUN: %libomptarget-compile-ve-unknown-linux-unknown | |||||
// RUN: env VE_LD_LIBRARY_PATH=%host-rtl-dir %libomptarget-run-fail-ve-unknown-linux-unknown 2>&1 \ | |||||
// RUN: | %fcheck-ve-unknown-linux-unknown | |||||
// CHECK: Libomptarget fatal error 1: failure of target construct while offloading is mandatory | // CHECK: Libomptarget fatal error 1: failure of target construct while offloading is mandatory | ||||
int main() { | int main() { | ||||
int arr[4] = {0, 1, 2, 3}; | int arr[4] = {0, 1, 2, 3}; | ||||
#pragma omp target data map(alloc: arr[0:2]) | #pragma omp target data map(alloc: arr[0:2]) | ||||
#pragma omp target data map(alloc: arr[1:2]) | #pragma omp target data map(alloc: arr[1:2]) | ||||
; | ; | ||||
return 0; | return 0; | ||||
} | } |