Skip to content

LLVM assert when defining same native function with different types #1866

Closed
@brson

Description

@brson
mod a {
    type rust_task = uint;
    native mod rustrt {
        fn rust_task_is_unwinding(rt: *rust_task) -> bool;
    }
}

mod b {
    type rust_task = bool;
    native mod rustrt {
        fn rust_task_is_unwinding(rt: *rust_task) -> bool;
    }
}

fn main() { }
rustc: /home/banderson/Dev/rust2/src/llvm/include/llvm/Support/Casting.h:194: typename llvm::cast_retty<To, From>::ret_type llvm::cast(const Y&) [with X = llvm::Function, Y = llvm::Value*, typename llvm::cast_retty<To, From>::ret_type = llvm::Function*]: Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-codegenArea: Code generationI-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions