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

13 lines
306 B
Rust

// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
// unit-test: GVN
// compile-flags: -C overflow-checks=on
// EMIT_MIR checked_add.main.GVN.diff
fn main() {
// CHECK-LABEL: fn main(
// CHECK: debug x => [[x:_.*]];
// CHECK: assert(!const false,
// CHECK: [[x]] = const 2_u32;
let x: u32 = 1 + 1;
}