[clang] [CUDA][HIP] Add a __device__ version of std::__glibcxx_assert_fail() (PR #136133)

Artem Belevich via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 18 10:54:47 PDT 2025


Artem-B wrote:

@jmmartinez  It appears that CUDA tests are broken by this change:
https://lab.llvm.org/buildbot/#/builders/69/builds/22562/steps/8/logs/stdio

```
FAILED: External/CUDA/CMakeFiles/algorithm-cuda-11.8-c++98-libstdc++-10.dir/algorithm.cu.o 
/buildbot/cuda-t4-0/work/clang-cuda-t4/clang/bin/clang++ -DNDEBUG  -O3 -DNDEBUG   -w -Werror=date-time -UNDEBUG --cuda-path=/buildbot/cuda-t4-0/work/clang-cuda-t4/external/cuda/cuda-11.8 -I/buildbot/cuda-t4-0/work/clang-cuda-t4/external/cuda/cuda-11.8/include --cuda-gpu-arch=sm_75 -std=c++98 -stdlib=libstdc++ --gcc-toolchain=/buildbot/cuda-t4-0/work/clang-cuda-t4/external/cuda/gcc-10 -DSTDLIB_VERSION=2014 -MD -MT External/CUDA/CMakeFiles/algorithm-cuda-11.8-c++98-libstdc++-10.dir/algorithm.cu.o -MF External/CUDA/CMakeFiles/algorithm-cuda-11.8-c++98-libstdc++-10.dir/algorithm.cu.o.d -o External/CUDA/CMakeFiles/algorithm-cuda-11.8-c++98-libstdc++-10.dir/algorithm.cu.o -c /buildbot/cuda-t4-0/work/clang-cuda-t4/llvm-test-suite/External/CUDA/algorithm.cu
In file included from <built-in>:1:
In file included from /buildbot/cuda-t4-0/work/clang-cuda-t4/clang/lib/clang/21/include/__clang_cuda_runtime_wrapper.h:41:
In file included from /buildbot/cuda-t4-0/work/clang-cuda-t4/clang/lib/clang/21/include/cuda_wrappers/cmath:28:
In file included from /buildbot/cuda-t4-0/work/clang-cuda-t4/external/cuda/gcc-10/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/cmath:41:
/buildbot/cuda-t4-0/work/clang-cuda-t4/clang/lib/clang/21/include/cuda_wrappers/bits/c++config.h:39:28: error: expected function body after function declarator
   39 | __glibcxx_assert_fail(...) noexcept {
      |                            ^
```

https://github.com/llvm/llvm-project/pull/136133


More information about the cfe-commits mailing list