Skip to content

pattern matching on a reference to an enum results in an llvm broken module error #3500

Closed
@erickt

Description

@erickt
fn main() {
    let x = &Some(1);
    match x {
        &Some(_) => (),
        &None => (),
    }
}

Errors out with:

Basic Block in function '_ZN4main17_aaf9e7b54e88829e3_00E' does not have terminator!
label %8
LLVM ERROR: Broken module, no Basic Block terminator!

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-codegenArea: Code generationI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions