[ELF] MergeInputSection: replace Fatal with Err
[llvm-project.git] / offload / test / sanitizer / kernel_trap_many.c
blobf2e63794168b2b0f9a8e438f52a96e915a880efc
1 // clang-format off
2 // RUN: %libomptarget-compile-generic
3 // RUN: %not --crash env -u LLVM_DISABLE_SYMBOLIZATION OFFLOAD_TRACK_NUM_KERNEL_LAUNCH_TRACES=24 %libomptarget-run-generic 2>&1 | %fcheck-generic --check-prefixes=TRACE,NDEBG
4 // RUN: %libomptarget-compile-generic -g
5 // RUN: %not --crash env -u LLVM_DISABLE_SYMBOLIZATION OFFLOAD_TRACK_NUM_KERNEL_LAUNCH_TRACES=16 %libomptarget-run-generic 2>&1 | %fcheck-generic --check-prefixes=TRACE,DEBUG
6 // clang-format on
8 // UNSUPPORTED: nvptx64-nvidia-cuda
9 // UNSUPPORTED: nvptx64-nvidia-cuda-LTO
10 // UNSUPPORTED: aarch64-unknown-linux-gnu
11 // UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
12 // UNSUPPORTED: x86_64-unknown-linux-gnu
13 // UNSUPPORTED: x86_64-unknown-linux-gnu-LTO
14 // UNSUPPORTED: s390x-ibm-linux-gnu
15 // UNSUPPORTED: s390x-ibm-linux-gnu-LTO
17 #include <omp.h>
19 int main(void) {
21 for (int i = 0; i < 10; ++i) {
22 #pragma omp target
26 #pragma omp target
28 __builtin_trap();
31 // TRACE: OFFLOAD ERROR: Kernel {{.*}} (__omp_offloading_{{.*}}_main_l26)
32 // TRACE: OFFLOAD ERROR: execution interrupted by hardware trap instruction
33 // TRACE: launchKernel
34 // NDEBG: main
35 // DEBUG: main {{.*}}kernel_trap_many.c: