diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2023-12-02 20:54:56 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2023-12-02 20:54:56 +0000 |
| commit | 45dd5d6bf340b48cf2a00755da4ca9dd7b6eb640 (patch) | |
| tree | a192a9c515a0e1cf3c7ffe41fb3870a93df345b2 | |
| parent | 6a8eea8f5b7feb9e1e87cf1673c11eab93307001 (diff) | |
| download | rust-45dd5d6bf340b48cf2a00755da4ca9dd7b6eb640.tar.gz rust-45dd5d6bf340b48cf2a00755da4ca9dd7b6eb640.zip | |
FileCheck mutable_variable_unprop_assign.
| -rw-r--r-- | tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs b/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs index 6bdb136a949..04e347fc03d 100644 --- a/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs +++ b/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs @@ -1,14 +1,24 @@ -// skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // unit-test: ConstProp // EMIT_MIR mutable_variable_unprop_assign.main.ConstProp.diff fn main() { + // CHECK-LABEL: fn main( + // CHECK: debug a => [[a:_.*]]; + // CHECK: debug x => [[x:_.*]]; + // CHECK: debug y => [[y:_.*]]; + // CHECK: debug z => [[z:_.*]]; + // CHECK: [[a]] = foo() + // CHECK: [[x]] = const (1_i32, 2_i32); + // CHECK: [[tmp:_.*]] = [[a]]; + // CHECK: ([[x]].1: i32) = move [[tmp]]; + // CHECK: [[y]] = ([[x]].1: i32); + // CHECK: [[z]] = const 1_i32; let a = foo(); let mut x: (i32, i32) = (1, 2); x.1 = a; let y = x.1; - let z = x.0; // this could theoretically be allowed, but we can't handle it right now + let z = x.0; } #[inline(never)] |
