2023-06-08 02:18:34 -05:00
|
|
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
2023-09-20 16:43:33 -05:00
|
|
|
//@ unit-test: GVN
|
2020-05-12 05:55:55 -05:00
|
|
|
|
2023-09-20 16:43:33 -05:00
|
|
|
// EMIT_MIR mutable_variable_aggregate_partial_read.main.GVN.diff
|
2020-05-12 05:55:55 -05:00
|
|
|
fn main() {
|
2023-12-02 14:51:23 -06:00
|
|
|
// CHECK-LABEL: fn main(
|
|
|
|
// CHECK: debug x => [[x:_.*]];
|
|
|
|
// CHECK: debug y => [[y:_.*]];
|
|
|
|
// CHECK: [[x]] = foo()
|
|
|
|
// CHECK: ([[x]].1: i32) = const 99_i32;
|
|
|
|
// CHECK: ([[x]].0: i32) = const 42_i32;
|
2023-09-20 16:43:33 -05:00
|
|
|
// CHECK: [[y]] = ([[x]].1: i32);
|
2020-05-12 05:55:55 -05:00
|
|
|
let mut x: (i32, i32) = foo();
|
|
|
|
x.1 = 99;
|
|
|
|
x.0 = 42;
|
|
|
|
let y = x.1;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[inline(never)]
|
|
|
|
fn foo() -> (i32, i32) {
|
|
|
|
unimplemented!()
|
|
|
|
}
|