mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-16 11:56:38 +00:00

Summary: The C library is intended to provide `__assert_fail`, so in the cases that we have both we should defer to that. This means that if you build the C library for GPUs you'll get the RPC based asser, and if not you'll get the trap based one.
16 lines
394 B
C
16 lines
394 B
C
// RUN: %libomptarget-compile-generic && %libomptarget-run-fail-generic 2>&1 | \
|
|
// RUN: %fcheck-generic --check-prefix=CHECK
|
|
|
|
// REQUIRES: libc
|
|
// REQUIRES: gpu
|
|
|
|
#include <assert.h>
|
|
|
|
int main() {
|
|
// CHECK: Assertion failed: '0 && "Trivial failure"' in function: 'int main()'
|
|
// CHECK-NOT: Assertion failed:
|
|
#pragma omp target
|
|
#pragma omp parallel
|
|
{ assert(0 && "Trivial failure"); }
|
|
}
|