]> git.proxmox.com Git - rustc.git/blob - tests/mir-opt/dataflow-const-prop/sibling_ptr.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / mir-opt / dataflow-const-prop / sibling_ptr.rs
1 // unit-test: DataflowConstProp
2
3 // EMIT_MIR sibling_ptr.main.DataflowConstProp.diff
4 fn main() {
5 let mut x: (u8, u8) = (0, 0);
6 unsafe {
7 let p = std::ptr::addr_of_mut!(x.0);
8 *p.add(1) = 1;
9 }
10 let x1 = x.1; // should not be propagated
11 }