rust/tests/mir-opt/const_prop/read_immutable_static.rs
2023-12-24 20:08:57 +00:00

12 lines
224 B
Rust

// 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;
}