Skip to content

Out-of-line initialization of static const member arrays doesn't work, and wrongly requires static const at definition site #5823

@devshgraphicsprogramming

Description

Description
When compiling with -HV 202x -T ps_6_7 -E PSMain it works and produces DXIL, when adding -spirv it SIGSEGVs the compiler.

Steps to Reproduce
https://godbolt.org/z/WasWzsq4E

If you strip all my C++ compat code then you have
https://godbolt.org/z/dWMfjxza1

Actual Behavior
SIGSEGV of the compiler.

I think this is because static outside of the class makes no sense in C++ (and for LLVM), but I cannot use const on its own because I get a different problem.

Environment

  • DXC version Latest trunk according to Godbolt
  • Host Operating System Linux I guess

Metadata

Metadata

Assignees

Labels

bugBug, regression, crashspirvWork related to SPIR-V

Type

No type

Projects

Status

New

Status

Triaged

Relationships

None yet

Development

No branches or pull requests

Issue actions