Mark test as panic=abort.

This commit is contained in:
Camille GILLOT 2022-11-15 18:06:45 +00:00
parent 779007da06
commit a18de7084a
4 changed files with 10 additions and 24 deletions

View File

@ -29,38 +29,22 @@
StorageDead(_4); // scope 0 at $DIR/sroa.rs:+1:29: +1:30 StorageDead(_4); // scope 0 at $DIR/sroa.rs:+1:29: +1:30
StorageDead(_3); // scope 0 at $DIR/sroa.rs:+1:29: +1:30 StorageDead(_3); // scope 0 at $DIR/sroa.rs:+1:29: +1:30
_1 = move (_2.1: Tag); // scope 0 at $DIR/sroa.rs:+1:5: +1:32 _1 = move (_2.1: Tag); // scope 0 at $DIR/sroa.rs:+1:5: +1:32
drop(_1) -> [return: bb1, unwind: bb2]; // scope 0 at $DIR/sroa.rs:+1:32: +1:33 drop(_1) -> bb1; // scope 0 at $DIR/sroa.rs:+1:32: +1:33
} }
bb1: { bb1: {
drop((_2.0: Tag)) -> [return: bb6, unwind: bb5]; // scope 0 at $DIR/sroa.rs:+1:32: +1:33 drop((_2.0: Tag)) -> bb3; // scope 0 at $DIR/sroa.rs:+1:32: +1:33
} }
bb2 (cleanup): { bb2: {
drop((_2.0: Tag)) -> bb7; // scope 0 at $DIR/sroa.rs:+1:32: +1:33
}
bb3 (cleanup): {
resume; // scope 0 at $DIR/sroa.rs:+0:1: +2:2
}
bb4: {
StorageDead(_2); // scope 0 at $DIR/sroa.rs:+1:32: +1:33 StorageDead(_2); // scope 0 at $DIR/sroa.rs:+1:32: +1:33
StorageDead(_1); // scope 0 at $DIR/sroa.rs:+1:32: +1:33 StorageDead(_1); // scope 0 at $DIR/sroa.rs:+1:32: +1:33
_0 = const (); // scope 0 at $DIR/sroa.rs:+0:19: +2:2 _0 = const (); // scope 0 at $DIR/sroa.rs:+0:19: +2:2
return; // scope 0 at $DIR/sroa.rs:+2:2: +2:2 return; // scope 0 at $DIR/sroa.rs:+2:2: +2:2
} }
bb5 (cleanup): { bb3: {
drop((_2.2: Tag)) -> bb3; // scope 0 at $DIR/sroa.rs:+1:32: +1:33 drop((_2.2: Tag)) -> bb2; // scope 0 at $DIR/sroa.rs:+1:32: +1:33
}
bb6: {
drop((_2.2: Tag)) -> [return: bb4, unwind: bb3]; // scope 0 at $DIR/sroa.rs:+1:32: +1:33
}
bb7 (cleanup): {
drop((_2.2: Tag)) -> bb3; // scope 0 at $DIR/sroa.rs:+1:32: +1:33
} }
} }

View File

@ -17,7 +17,7 @@
StorageLive(_5); // scope 0 at $DIR/sroa.rs:+2:34: +2:37 StorageLive(_5); // scope 0 at $DIR/sroa.rs:+2:34: +2:37
_5 = g() -> bb1; // scope 0 at $DIR/sroa.rs:+2:34: +2:37 _5 = g() -> bb1; // scope 0 at $DIR/sroa.rs:+2:34: +2:37
// mir::Constant // mir::Constant
// + span: $DIR/sroa.rs:76:34: 76:35 // + span: $DIR/sroa.rs:78:34: 78:35
// + literal: Const { ty: fn() -> u32 {g}, val: Value(<ZST>) } // + literal: Const { ty: fn() -> u32 {g}, val: Value(<ZST>) }
} }
@ -31,7 +31,7 @@
_2 = &raw const (*_3); // scope 0 at $DIR/sroa.rs:+2:7: +2:41 _2 = &raw const (*_3); // scope 0 at $DIR/sroa.rs:+2:7: +2:41
_1 = f(move _2) -> bb2; // scope 0 at $DIR/sroa.rs:+2:5: +2:42 _1 = f(move _2) -> bb2; // scope 0 at $DIR/sroa.rs:+2:5: +2:42
// mir::Constant // mir::Constant
// + span: $DIR/sroa.rs:76:5: 76:6 // + span: $DIR/sroa.rs:78:5: 78:6
// + literal: Const { ty: fn(*const u32) {f}, val: Value(<ZST>) } // + literal: Const { ty: fn(*const u32) {f}, val: Value(<ZST>) }
} }

View File

@ -53,7 +53,7 @@
+ _9 = move _6; // scope 0 at $DIR/sroa.rs:+1:30: +1:70 + _9 = move _6; // scope 0 at $DIR/sroa.rs:+1:30: +1:70
+ _10 = const "a"; // scope 0 at $DIR/sroa.rs:+1:30: +1:70 + _10 = const "a"; // scope 0 at $DIR/sroa.rs:+1:30: +1:70
// mir::Constant // mir::Constant
// + span: $DIR/sroa.rs:55:52: 55:55 // + span: $DIR/sroa.rs:57:52: 57:55
// + literal: Const { ty: &str, val: Value(Slice(..)) } // + literal: Const { ty: &str, val: Value(Slice(..)) }
- (_5.3: std::option::Option<isize>) = move _7; // scope 0 at $DIR/sroa.rs:+1:30: +1:70 - (_5.3: std::option::Option<isize>) = move _7; // scope 0 at $DIR/sroa.rs:+1:30: +1:70
+ _11 = move _7; // scope 0 at $DIR/sroa.rs:+1:30: +1:70 + _11 = move _7; // scope 0 at $DIR/sroa.rs:+1:30: +1:70

View File

@ -1,4 +1,6 @@
// unit-test: ScalarReplacementOfAggregates // unit-test: ScalarReplacementOfAggregates
// compile-flags: -Cpanic=abort
// no-prefer-dynamic
struct Tag(usize); struct Tag(usize);