2022-07-26 19:04:27 +02:00
|
|
|
// unit-test
|
2020-05-06 19:28:48 +02:00
|
|
|
// compile-flags: -O
|
|
|
|
|
|
2022-12-22 16:33:12 +01:00
|
|
|
static mut STATIC: u32 = 0x42424242;
|
2020-05-06 19:28:48 +02:00
|
|
|
|
2020-07-27 21:22:43 +02:00
|
|
|
// EMIT_MIR mutable_variable_no_prop.main.ConstProp.diff
|
2020-05-06 19:28:48 +02:00
|
|
|
fn main() {
|
|
|
|
|
let mut x = 42;
|
|
|
|
|
unsafe {
|
|
|
|
|
x = STATIC;
|
|
|
|
|
}
|
|
|
|
|
let y = x;
|
|
|
|
|
}
|