Skip to content

LLVM Error: Instruction does not dominate all uses #22096

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

Closed
mandel59 opened this issue Feb 8, 2015 · 1 comment
Closed

LLVM Error: Instruction does not dominate all uses #22096

mandel59 opened this issue Feb 8, 2015 · 1 comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@mandel59
Copy link

mandel59 commented Feb 8, 2015

use E::{A,B};

#[derive(Debug, Clone)]
enum E {
    A(i64),
    B(Box<E>),
}

fn f(a: &mut E) {
    *a = match *a {
        B(ref b) => *b.clone(),
        _ => a.clone(),
    }
}

fn main() {
    let mut a = B(Box::new(A(1)));
    f(&mut a);
}

This code yields the following message during compilation:

Instruction does not dominate all uses!
  %9 = load %enum.E** %2, !nonnull !0
  %17 = bitcast %enum.E* %9 to i8*
Instruction does not dominate all uses!
  %9 = load %enum.E** %2, !nonnull !0
  %21 = bitcast %enum.E* %9 to i8*
LLVM ERROR: Broken function found, compilation aborted!
@jdm jdm added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Feb 9, 2015
@ghost
Copy link

ghost commented Feb 10, 2015

A duplicate of #15892, closing. Thanks for the report! :)

@ghost ghost closed this as completed Feb 10, 2015
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

2 participants