Open
Description
Reproducer:
https://godbolt.org/z/9qrdGE55d
When trying to call __builtin_abort()
in __device__
or __global__
code, clang doesn't throw a compilation error, instead generating the call.uni abort
instruction. ptxas then fails at link-time because abort
does not exist.
By comparison, nvcc throws the error calling a __host__ function("__builtin_abort") from a __global__ function("f") is not allowed
.
Perhaps clang should throw an error earlier too?