Skip to content

-fsycl disregards __vectorcall, breaking parse of type_traits on Windows #7738

Description

@MathiasMagnus

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcompilerCompiler related issueconfirmed

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions