rust/tests/mir-opt/dataflow-const-prop/checked.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
309 B
Rust
Raw Normal View History

2023-04-05 03:44:20 -05:00
// ignore-wasm32 compiled with panic=abort by default
// unit-test: DataflowConstProp
// compile-flags: -Coverflow-checks=on
// EMIT_MIR checked.main.DataflowConstProp.diff
#[allow(arithmetic_overflow)]
fn main() {
let a = 1;
let b = 2;
let c = a + b;
let d = i32::MAX;
let e = d + 1;
}