https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115740
--- Comment #16 from Zhao Wei Liew <zhaoweiliew at gmail dot com> --- Upon further thought, the required macro should be #if defined(__clang__) && defined(__CUDA__) && defined(__HIP__) without any the guard on device mode or host mode. This is because we want __builtin_abort to be used whenever we're compiling CUDA/HIP code with clang, regardless of whether it's compiling in in device mode or host mode.