]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/const_prop/optimizes_into_variable.rs
Add 'compiler/rustc_codegen_gcc/' from commit 'afae271d5d3719eeb92c18bc004bb6d1965a5f3f'
[rust.git] / src / test / mir-opt / const_prop / optimizes_into_variable.rs
1 // compile-flags: -C overflow-checks=on
2
3 struct Point {
4     x: u32,
5     y: u32,
6 }
7
8 // EMIT_MIR_FOR_EACH_BIT_WIDTH
9 // EMIT_MIR optimizes_into_variable.main.ConstProp.diff
10 // EMIT_MIR optimizes_into_variable.main.SimplifyLocals.after.mir
11 fn main() {
12     let x = 2 + 2;
13     let y = [0, 1, 2, 3, 4, 5][3];
14     let z = (Point { x: 12, y: 42}).y;
15 }