diff --git a/flang-rt/include/flang-rt/runtime/terminator.h b/flang-rt/include/flang-rt/runtime/terminator.h index a20f50ee05a8..047b576be4bc 100644 --- a/flang-rt/include/flang-rt/runtime/terminator.h +++ b/flang-rt/include/flang-rt/runtime/terminator.h @@ -118,7 +118,7 @@ RT_API_ATTRS void NotifyOtherImagesOfErrorTermination(); #if defined(RT_DEVICE_COMPILATION) /// Trap the execution on the device. -[[noreturn]] void RT_API_ATTRS DeviceTrap() { +[[noreturn]] static inline void RT_API_ATTRS DeviceTrap() { #if defined(__CUDACC__) // NVCC supports __trap(). __trap();