summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/const_prop/const_prop_fails_gracefully.rs
blob: 44d4878424dd81c66bd929048eaf79c021e0398f (plain)
1
2
3
4
5
6
7
8
9
10
11
// ignore-wasm32 compiled with panic=abort by default
// unit-test: ConstProp
#[inline(never)]
fn read(_: usize) { }

// EMIT_MIR const_prop_fails_gracefully.main.ConstProp.diff
fn main() {
    const FOO: &i32 = &1;
    let x = FOO as *const i32 as usize;
    read(x);
}