microsoft / microsoft/DirectXShaderCompiler
Crash: cast<X>() error when two func call in together! but only any one is Success
Open
Nobody has claimed this yet.
bug
diagnostic
incorrect-code
- Dominant language
- C++
- Stars
- 3.7k
- Forks
- 900
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 44
Description
Description
- Scenario A: Call
Tests1(DefaultMemory)only inmain()-> Success - Scenario B: Call
Tests2(ret)only inmain()-> Success - Scenario A&B (The Bug): Call both in
main()-> Crash (cast<X>() argument of incompatible type!)
A very strange and incomprehensible mistake
Steps to Reproduce
godbolt.org full share link
or short link
Actual Behavior
error: cast() argument of incompatible type!
Compiler returned: 5
Environment
- DXC 1.8.2505
- Windows10
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.
Research direction
Start by reproducing the HLSL example from the provided Godbolt short link with DXC 1.8.2505, comparing each function call alone with both calls together. Trace the compiler failure from the main entry point and confirm the fix by compiling the combined case without the incompatible cast<X>() error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100