Files
clang-p2996/openmp/libomptarget/test/api/assert.c
Joseph Huber 86587f2891 [Libomptarget] Fix compiling with asserts using the bitcode library
Sumnmary:
A previous patch introduces an `exports` file which contains all the
symbol names that are not internalized in the bitcode library. This is
done to reduce the size of the bitcode library and only export needed
functions. This export file must contain all the functoins expected to
be called from the device. Since its introduction the `__assert_fail`
function used to be provided but was mistakenly not included. This patch
adds it.

Fixes #57656

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D133594
2022-09-09 15:25:24 -05:00

15 lines
207 B
C

// RUN: %libomptarget-compile-run-and-check-generic
#include <assert.h>
#include <stdio.h>
int main() {
int i = 1;
#pragma omp target
assert(i > 0);
// CHECK: PASS
printf("PASS\n");
return 0;
}