Skip to content

Crash: cast<X>() error when two func call in together! but only any one is Success #8150

@vec2vec2

Description

@vec2vec2

Description

  • Scenario A: Call Tests1(DefaultMemory) only in main()-> Success
  • Scenario B: Call Tests2(ret) only in main()-> 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug, regression, crashdiagnosticIssues for diagnosticsincorrect-codeIssues relating to handling of incorrect code

    Type

    No type

    Projects

    Status

    Triaged

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions