diff --git a/openmp/libomptarget/deviceRTLs/common/debug.h b/openmp/libomptarget/deviceRTLs/common/debug.h --- a/openmp/libomptarget/deviceRTLs/common/debug.h +++ b/openmp/libomptarget/deviceRTLs/common/debug.h @@ -142,13 +142,17 @@ template NOINLINE static void check(bool cond, const char *fmt, Arguments... parameters) { - if (!cond) + if (!cond) { printf(fmt, (int)GetBlockIdInKernel(), (int)GetThreadIdInBlock(), (int)GetWarpId(), (int)GetLaneId(), parameters...); - assert(cond); + __builtin_trap(); + } } -NOINLINE static void check(bool cond) { assert(cond); } +NOINLINE static void check(bool cond) { + if (!cond) + __builtin_trap(); +} #endif // set flags that are tested (inclusion properties) diff --git a/openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.h b/openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.h --- a/openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.h +++ b/openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.h @@ -12,7 +12,6 @@ #ifndef _TARGET_IMPL_H_ #define _TARGET_IMPL_H_ -#include #include #include #include