26 lines · c
1// clang-format off2// RUN: %libomptarget-compileopt-generic3// RUN: %not --crash env -u LLVM_DISABLE_SYMBOLIZATION OFFLOAD_TRACK_ALLOCATION_TRACES=1 %libomptarget-run-generic 2>&1 | %fcheck-generic --check-prefixes=CHECK,NDEBG4// RUN: %libomptarget-compileopt-generic -g5// RUN: %not --crash env -u LLVM_DISABLE_SYMBOLIZATION OFFLOAD_TRACK_ALLOCATION_TRACES=1 %libomptarget-run-generic 2>&1 | %fcheck-generic --check-prefixes=CHECK,DEBUG6// clang-format on7 8// UNSUPPORTED: aarch64-unknown-linux-gnu9// UNSUPPORTED: aarch64-unknown-linux-gnu-LTO10// UNSUPPORTED: x86_64-unknown-linux-gnu11// UNSUPPORTED: x86_64-unknown-linux-gnu-LTO12// UNSUPPORTED: s390x-ibm-linux-gnu13// UNSUPPORTED: s390x-ibm-linux-gnu-LTO14 15#include <omp.h>16 17int main(void) {18 int X;19 omp_target_free(&X, 0);20}21 22// CHECK: OFFLOAD ERROR: deallocation of non-allocated device memory: 0x23// CHECK: dataDelete24// NDEBG: main25// DEBUG: main {{.*}}free_host_ptr.c:2026