summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/dataflow-const-prop/terminator.rs
blob: 4f001df35f14d475187af0dfa2032d22dc458fb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
// ignore-wasm32 compiled with panic=abort by default
// unit-test: DataflowConstProp

fn foo(n: i32) {}

// EMIT_MIR terminator.main.DataflowConstProp.diff
fn main() {
    let a = 1;
    // Checks that we propagate into terminators.
    foo(a + 1);
}