summaryrefslogtreecommitdiffstats
path: root/src/test/mir-opt/const_prop/const_prop_fails_gracefully.rs
blob: 8bd68527f37033bf1f0de2dd52d9dd622318ffa3 (plain)
1
2
3
4
5
6
7
8
9
#[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);
}