diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2023-12-02 20:50:00 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2023-12-02 20:50:00 +0000 |
| commit | d91bb5074e4f926bb9c2b2b43237bcf8d3c512b6 (patch) | |
| tree | 536a671eeaaef4e494e3ccc945e7195c1ac47fb5 | |
| parent | 3e169abc1b2331c608b9c085417d2ecd64293235 (diff) | |
| download | rust-d91bb5074e4f926bb9c2b2b43237bcf8d3c512b6.tar.gz rust-d91bb5074e4f926bb9c2b2b43237bcf8d3c512b6.zip | |
FileCheck mutable_variable_no_prop.
| -rw-r--r-- | tests/mir-opt/const_prop/mutable_variable_no_prop.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/mir-opt/const_prop/mutable_variable_no_prop.rs b/tests/mir-opt/const_prop/mutable_variable_no_prop.rs index a7aeeccd861..49e9a701581 100644 --- a/tests/mir-opt/const_prop/mutable_variable_no_prop.rs +++ b/tests/mir-opt/const_prop/mutable_variable_no_prop.rs @@ -1,10 +1,17 @@ -// skip-filecheck // unit-test: ConstProp +// Verify that we do not propagate the contents of this mutable static. static mut STATIC: u32 = 0x42424242; // EMIT_MIR mutable_variable_no_prop.main.ConstProp.diff fn main() { + // CHECK-LABEL: fn main( + // CHECK: debug x => [[x:_.*]]; + // CHECK: debug y => [[y:_.*]]; + // CHECK: [[x]] = const 42_u32; + // CHECK: [[tmp:_.*]] = (*{{_.*}}); + // CHECK: [[x]] = move [[tmp]]; + // CHECK: [[y]] = [[x]]; let mut x = 42; unsafe { x = STATIC; |
