2023-10-16 12:36:39 -05:00
|
|
|
// skip-filecheck
|
2022-08-25 11:43:46 -05:00
|
|
|
// unit-test: DataflowConstProp
|
2022-11-09 11:03:30 -06:00
|
|
|
// compile-flags: -Coverflow-checks=on
|
2023-09-17 04:35:06 -05:00
|
|
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
2022-08-25 11:43:46 -05:00
|
|
|
|
|
|
|
// 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;
|
|
|
|
}
|