diff --git a/openmp/libomptarget/DeviceRTL/include/Debug.h b/openmp/libomptarget/DeviceRTL/include/Debug.h --- a/openmp/libomptarget/DeviceRTL/include/Debug.h +++ b/openmp/libomptarget/DeviceRTL/include/Debug.h @@ -17,6 +17,8 @@ /// { extern "C" { void __assert_assume(bool cond, const char *exp, const char *file, int line); +void __assert_fail(const char *assertion, const char *file, unsigned line, + const char *function); } #define ASSERT(e) __assert_assume(e, #e, __FILE__, __LINE__) diff --git a/openmp/libomptarget/DeviceRTL/src/Debug.cpp b/openmp/libomptarget/DeviceRTL/src/Debug.cpp --- a/openmp/libomptarget/DeviceRTL/src/Debug.cpp +++ b/openmp/libomptarget/DeviceRTL/src/Debug.cpp @@ -26,6 +26,13 @@ __builtin_assume(cond); } + +void __assert_fail(const char *assertion, const char *file, unsigned line, + const char *function) { + PRINTF("%s:%u: %s: Assertion `%s' failed.\n", file, line, function, + assertion); + __builtin_trap(); +} } #pragma omp end declare target