summary refs log tree commit diff
path: root/tests/mir-opt/const_prop/read_immutable_static.rs
blob: a3d8fee65d745d9a5343158ebe357eafa4ced5e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
// unit-test: GVN

static FOO: u8 = 2;

// EMIT_MIR read_immutable_static.main.GVN.diff
fn main() {
    // CHECK-LABEL: fn main(
    // CHECK: debug x => [[x:_.*]];
    // CHECK: [[x]] = const 4_u8;
    let x = FOO + FOO;
}