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

LLVM_ERROR with -Zmir-opt-level=3: match.rs #75507

Closed
matthiaskrgr opened this issue Aug 13, 2020 · 2 comments
Closed

LLVM_ERROR with -Zmir-opt-level=3: match.rs #75507

matthiaskrgr opened this issue Aug 13, 2020 · 2 comments
Labels
A-mir-opt Area: MIR optimizations C-bug Category: This is a bug.

Comments

@matthiaskrgr
Copy link
Member

Code from ./src/test/codegen/match.rs

#![crate_type = "lib"]

pub enum E {
    A,
    B,
}

#[no_mangle]
pub fn exhaustive_match(e: E) -> u8 {
    match e {
        E::A => 0,
        E::B => 1,
    }
}

There was an LLVM ERROR with
rustc ./src/test/codegen/match.rs -Zmir-opt-level=3

Function return type does not match operand type of return inst!
  ret i1 %7
 i8in function exhaustive_match
LLVM ERROR: Broken function found, compilation aborted!

Meta

repo @ 5e3f1b1

Backtrace

Function return type does not match operand type of return inst!
  ret i1 %7
 i8in function exhaustive_match
LLVM ERROR: Broken function found, compilation aborted!

@matthiaskrgr matthiaskrgr added the C-bug Category: This is a bug. label Aug 13, 2020
@matthiaskrgr
Copy link
Member Author

Probably related to #75382

@JulianKnodt
Copy link
Contributor

Should be fixed by #75537

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-mir-opt Area: MIR optimizations C-bug Category: This is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants