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

ICE when #[no_mangle] function is declared multiple times with different signatures. #18358

Closed
mahkoh opened this issue Oct 27, 2014 · 3 comments
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@mahkoh
Copy link
Contributor

mahkoh commented Oct 27, 2014

#![allow(dead_code)]

mod x {
    #[no_mangle]
    fn f() { }
}

mod y {
    #[no_mangle]
    fn f(_: i32) { }
}

fn main() { }

rustc: /build/rust-git/src/rust/src/llvm/include/llvm/Support/Casting.h:237: typename llvm::cast_retty<X, Y*>::ret_type llvm::cast(Y_) [with X = llvm::Function; Y = llvm::Value; typename llvm::cast_retty<X, Y_>::ret_type = llvm::Function*]: Assertion `isa(Val) && "cast() argument of incompatible type!"' failed.

@sfackler sfackler added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Oct 27, 2014
@sfackler
Copy link
Member

I could have sworn this had already been filed, but I can't find it.

@steveklabnik
Copy link
Member

This still ICEs for me today.

@klutzy
Copy link
Contributor

klutzy commented Feb 24, 2015

Dup of #10883?

@mahkoh mahkoh closed this as completed Apr 11, 2015
@rust-lang rust-lang locked and limited conversation to collaborators Apr 11, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

4 participants