Skip to content

Commit d91bb50

Browse files
committed
FileCheck mutable_variable_no_prop.
1 parent 3e169ab commit d91bb50

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/mir-opt/const_prop/mutable_variable_no_prop.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
1-
// skip-filecheck
21
// unit-test: ConstProp
32

3+
// Verify that we do not propagate the contents of this mutable static.
44
static mut STATIC: u32 = 0x42424242;
55

66
// EMIT_MIR mutable_variable_no_prop.main.ConstProp.diff
77
fn main() {
8+
// CHECK-LABEL: fn main(
9+
// CHECK: debug x => [[x:_.*]];
10+
// CHECK: debug y => [[y:_.*]];
11+
// CHECK: [[x]] = const 42_u32;
12+
// CHECK: [[tmp:_.*]] = (*{{_.*}});
13+
// CHECK: [[x]] = move [[tmp]];
14+
// CHECK: [[y]] = [[x]];
815
let mut x = 42;
916
unsafe {
1017
x = STATIC;

0 commit comments

Comments
 (0)