]> git.proxmox.com Git - rustc.git/blame - src/test/mir-opt/dest-prop/cycle.rs
New upstream version 1.52.0~beta.3+dfsg1
[rustc.git] / src / test / mir-opt / dest-prop / cycle.rs
CommitLineData
1b1a35ee 1//! Tests that cyclic assignments don't hang DestinationPropagation, and result in reasonable code.
6a06907d 2// compile-flags: -Zunsound-mir-opts
1b1a35ee
XL
3fn val() -> i32 {
4 1
5}
6
7// EMIT_MIR cycle.main.DestinationPropagation.diff
8fn main() {
9 let mut x = val();
10 let y = x;
11 let z = y;
12 x = z;
13
14 drop(x);
15}