about summary refs log tree commit diff
path: root/tests/mir-opt/const_prop/read_immutable_static.rs
blob: 05fec2f3303b02b7f0a0ddee6e8fdd9ccc4de08f (plain)
1
2
3
4
5
6
7
8
9
10
11
//@ test-mir-pass: 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;
}