about summary refs log tree commit diff
path: root/tests/codegen-llvm/mir_zst_stores.rs
blob: ff1d429cffdb3392eca9216e9187c288cdc4cc35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//@ compile-flags: -C no-prepopulate-passes

#![crate_type = "lib"]
use std::marker::PhantomData;

#[derive(Copy, Clone)]
struct Zst {
    phantom: PhantomData<Zst>,
}

// CHECK-LABEL: @mir
// CHECK-NOT: store{{.*}}undef
#[no_mangle]
pub fn mir() {
    let x = Zst { phantom: PhantomData };
    let y = (x, 0);
    drop(y);
    drop((0, x));
}