[llvm] [NVPTX] Fix for device function pointer having the same name as generated callprototype (PR #205639)
Daniel Donenfeld via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 27 05:25:04 PDT 2026
daniel-donenfeld wrote:
This was originally reported from an internal stress test, and can affect C++ programs. This was the reproducer:
```
__device__ int simple_func() { return 42; }
__device__ int (*prototype_0)(int, int, int, int) = nullptr;
__device__ int call_via_prototype_0(int a, int b, int c, int d) {
if (prototype_0 != nullptr)
return prototype_0(a, b, c, d);
return a + b + c + d;
}
```
This fix does not stop someone from writing LLVM with this name collision, but it stops C++ users from hitting this issue. Though it is likely extremely uncommon
https://github.com/llvm/llvm-project/pull/205639
More information about the llvm-commits
mailing list