Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal Compiler error: calling method that modifies const object #4350

Open
tex3d opened this issue Mar 25, 2022 · 3 comments
Open

Internal Compiler error: calling method that modifies const object #4350

tex3d opened this issue Mar 25, 2022 · 3 comments
Labels
bug Bug, regression, crash hlsl-next Bugs for consideration on next language version
Milestone

Comments

@tex3d
Copy link
Contributor

tex3d commented Mar 25, 2022

Related to #4340.

// RUN: %dxc -T vs_6_0 %s | FileCheck %s

// Internal Compiler error: llvm::cast<X>() argument of incompatible type!

struct MyStruct {
    int Idx;
    void Set() {
        Idx = 1;
    }
} Obj;

void main()
{
    Obj.Set();
}
@tex3d tex3d added the bug Bug, regression, crash label Mar 25, 2022
@llvm-beanz llvm-beanz added this to the Dormant milestone Jul 24, 2024
@llvm-beanz llvm-beanz added the hlsl-next Bugs for consideration on next language version label Jul 24, 2024
@llvm-beanz
Copy link
Collaborator

Godbolt link: https://godbolt.org/z/adMedG6xc

@llvm-beanz
Copy link
Collaborator

This requires a language change to get right because HLSL's overload resolution doesn't handle const-ness of the implicit object.

@llvm-beanz llvm-beanz moved this to Triaged in HLSL Triage Jul 24, 2024
@llvm-beanz
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug, regression, crash hlsl-next Bugs for consideration on next language version
Projects
Status: Triaged
Development

No branches or pull requests

2 participants