Skip to content

LLVM assertion failure for creating extern fns with same name but different signatures #16403

Closed
@SSheldon

Description

@SSheldon

The following crashes rustc:

fn main() {
    {
        extern fn foo() { }
    }

    {
        extern fn foo(_bar: uint) { }
    }
}

It doesn't even give the nice ICE message, just this:

Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/llvm/include/llvm/Support/Casting.h, line 237.
Abort trap: 6

I am using rustc 0.12.0-pre-nightly (4d4eb1023 2014-08-02 23:36:09 +0000). This issue looks similar to #5791?

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions