-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlA-codegenArea: Code generationArea: Code generation
Description
const C: [u32; 5] = [0, 42, 112, 212, 433];
#[rustc_mir(graphviz="foo.gv")]
fn mir() {
C[3];
}
fn main(){}
will fail to compile with an LLVM abort:
Stored value type does not match pointer operand type!
store [5 x i32] %4, i32* %temp1, align 4
i32Invalid bitcast
i8 addrspace(9)* bitcast (%str_slice { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str3466, i32 0, i32 0), i64 7 } to i8 addrspace(9)*)
Seems to be a mis-translation of indexing (trans/mir/lvalue at ProjectionElem::Index
).
Metadata
Metadata
Assignees
Labels
A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlA-codegenArea: Code generationArea: Code generation