microsoft / microsoft/DirectXShaderCompiler
Out-of-line initialization of `static const` member arrays doesn't work, and wrongly requires `static const` at definition site
Open
Nobody has claimed this yet.
bug
spirv
- Dominant language
- C++
- Stars
- 3.7k
- Forks
- 900
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 44
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.