]>
Commit | Line | Data |
---|---|---|
1b1a35ee | 1 | //! Tests that cyclic assignments don't hang DestinationPropagation, and result in reasonable code. |
6a06907d | 2 | // compile-flags: -Zunsound-mir-opts |
1b1a35ee XL |
3 | fn val() -> i32 { |
4 | 1 | |
5 | } | |
6 | ||
7 | // EMIT_MIR cycle.main.DestinationPropagation.diff | |
8 | fn main() { | |
9 | let mut x = val(); | |
10 | let y = x; | |
11 | let z = y; | |
12 | x = z; | |
13 | ||
14 | drop(x); | |
15 | } |