Skip to content

Compiling to an output file with the same name as a native function hits LLVM assert #1251

Closed
@brson

Description

@brson

Compile the following with rustc unsupervise.rs -o unsupervise

native mod rustrt {
    fn unsupervise();
}

fn main() { }
rustc: /home/brian/Dev/rust/src/llvm/lib/MC/MCAssembler.cpp:132: uint64_t llvm::MCAsmLayout::getSymbolOffset(const llvm::MCSymbolData*) const: Assertion `SD->getFragment() && "Invalid getOffset() on undefined symbol!"' failed.
Stack dump:
0.      Running pass 'Function Pass Manager' on module 'unsupervise'.
Aborted

Only happens on Linux (Ubuntu 10.10 here). Thanks araujo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.O-linuxOperating system: Linux

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions