1// RUN: %libomptarget-compile-generic && %libomptarget-run-fail-generic 2>&1 | \
2// RUN: %fcheck-generic --check-prefix=CHECK
3
4// REQUIRES: libc
5
6// NVPTX without LTO uses the implementation in OpenMP currently.
7// UNSUPPORTED: nvptx64-nvidia-cuda
8// UNSUPPORTED: powerpc64-ibm-linux-gnu
9// UNSUPPORTED: powerpc64-ibm-linux-gnu-LTO
10// UNSUPPORTED: aarch64-unknown-linux-gnu
11// UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
12// UNSUPPORTED: x86_64-pc-linux-gnu
13// UNSUPPORTED: x86_64-pc-linux-gnu-LTO
14
15#include <assert.h>
16
17int main() {
18 // CHECK: Assertion failed: '0 && "Trivial failure"' in function: 'int main()'
19 // CHECK-NOT: Assertion failed:
20#pragma omp target
21#pragma omp parallel
22 { assert(0 && "Trivial failure"); }
23}
24

source code of offload/test/libc/assert.c