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

compiler crash on stable, beta, nightly #27925

Closed
spacejam opened this issue Aug 20, 2015 · 1 comment
Closed

compiler crash on stable, beta, nightly #27925

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

Comments

@spacejam
Copy link

struct Sched {
    i: i32,
}

impl Sched {
    extern "C" fn get(self) -> i32 { self.i }
}

fn main() {
    let s = Sched { i: 4 };
    let f = || -> i32 {
         s.get()
    };
    println!("f: {}", f());
}

stable/beta:

Stored value type does not match pointer operand type!
  store { i64 } %0, i32* %1, align 4
 i32LLVM ERROR: Broken function found, compilation aborted!

nightly:

rustc: /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/llvm/lib/IR/Instructions.cpp:995: void llvm::StoreInst::AssertOK(): Assertion `getOperand(0)->getType() == cast<PointerType>(getOperand(1)->getType())->getElementType() && "Ptr must be a pointer to Val type!"' failed.
Aborted (core dumped)
@steveklabnik steveklabnik added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Aug 20, 2015
@steveklabnik
Copy link
Member

As of last night's nightly, this no longer ICEs.

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