Skip to content

--emit=asm,link -C opt-level=1 causes "Instruction does not dominate all uses!" #24876

Closed
@huonw

Description

@huonw
fn main() {
    let mut v = 0;
    for i in 0..0 {
        v += i;
    }
    println!("{}", v)
}

Compiling with rustc --emit=asm,link -C opt-level=1 (with 1.1.0-nightly (da623844a 2015-04-25) (built 2015-04-26) gives:

Instruction does not dominate all uses!
  %1 = bitcast %"2.core::fmt::Arguments"* %0 to i64*
  %tmpcast = bitcast i64* %1 to %"2.core::ops::Range<i32>"*
LLVM ERROR: Broken function found, compilation aborted!

Metadata

Metadata

Assignees

No one assigned

    Labels

    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