Describe the bug
When targeting any device (non-x86) target on Windows, the __vectorcall attribute on function pointer types is discarded. This causes a type redefinition error when including type_traits from MSVC STL (which pretty much any STL header pulls in), because the implementation of _Is_memfunptr is specialized for every function pointer type with all types of decorators. Because __vectorcall is discarded for device architectures
warning: '__vectorcall' calling convention is not supported for this target [-Wignored-attributes]
the specialization will clash with a previous definition, violating ODR.
To Reproduce
Godbolt
Environment (please complete the following information):
- OS: Windows
- Target device and vendor: HIP (AMD), but likely any non-x86 ISA
- DPC++ version: Intel LLVM at 5995c61
Additional context
ComputeCpp and HIP (amdclang) compilers parse MSVC STL just fine. No amount of -fms-compatibility et al can put the front-end into a mode that preserves this calling convention and would only shriek if codegen would need to occur for the target arch at hand.
Describe the bug
When targeting any device (non-x86) target on Windows, the
__vectorcallattribute on function pointer types is discarded. This causes a type redefinition error when includingtype_traitsfrom MSVC STL (which pretty much any STL header pulls in), because the implementation of_Is_memfunptris specialized for every function pointer type with all types of decorators. Because__vectorcallis discarded for device architecturesthe specialization will clash with a previous definition, violating ODR.
To Reproduce
Godbolt
Environment (please complete the following information):
Additional context
ComputeCpp and HIP (amdclang) compilers parse MSVC STL just fine. No amount of
-fms-compatibilityet al can put the front-end into a mode that preserves this calling convention and would only shriek if codegen would need to occur for the target arch at hand.