Issue |
56697
|
Summary |
Compatibility problem of clang and NVCC in ‘auto’ type deduction
|
Labels |
|
Assignees |
|
Reporter |
objwyhx
|
`
#define foo_device __attribute__((device))
#define foo_host __attribute__((host))
typedef unsigned long size_t;
extern foo_host int foo(void **devPtr, size_t size);
template <typename T>
static foo_device int foo(T **devPtr, size_t size);
template<class T>
static foo_host int foo(T **devPtr, size_t size) {
return ::foo((void**)(void*)devPtr, size);
}
int main() {
auto fp = &foo<double>;
return 0;
}
`
nvcc accept this code but clang doesn't accept it.
https://godbolt.org/z/3vdq3KvEP
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs