Skip to content

dereferencing a single-variant enum allowed in typeck, hits LLVM assert in trans #9814

Closed
@thestinger

Description

@thestinger
fn main() {
    enum Foo { Bar(int) }
    let _x = *Bar(2);
}
rustc: /build/rust-git/src/rust/src/llvm/lib/IR/Instructions.cpp:1084: void llvm::StoreInst::AssertOK(): Assertion `getOperand(0)->getType() == cast<PointerType>(getOperand(1)->getType())->getElementType() && "Ptr must be a pointer to Val type!"' failed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions