diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:57:31 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:57:31 +0000 |
commit | dc0db358abe19481e475e10c32149b53370f1a1c (patch) | |
tree | ab8ce99c4b255ce46f99ef402c27916055b899ee /tests/mir-opt/issue_41110.main.ElaborateDrops.panic-unwind.diff | |
parent | Releasing progress-linux version 1.71.1+dfsg1-2~progress7.99u1. (diff) | |
download | rustc-dc0db358abe19481e475e10c32149b53370f1a1c.tar.xz rustc-dc0db358abe19481e475e10c32149b53370f1a1c.zip |
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/mir-opt/issue_41110.main.ElaborateDrops.panic-unwind.diff')
-rw-r--r-- | tests/mir-opt/issue_41110.main.ElaborateDrops.panic-unwind.diff | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/tests/mir-opt/issue_41110.main.ElaborateDrops.panic-unwind.diff b/tests/mir-opt/issue_41110.main.ElaborateDrops.panic-unwind.diff new file mode 100644 index 000000000..11501907b --- /dev/null +++ b/tests/mir-opt/issue_41110.main.ElaborateDrops.panic-unwind.diff @@ -0,0 +1,69 @@ +- // MIR for `main` before ElaborateDrops ++ // MIR for `main` after ElaborateDrops + + fn main() -> () { + let mut _0: (); + let _1: (); + let mut _2: S; + let mut _3: S; + let mut _4: S; ++ let mut _5: bool; + scope 1 { + debug x => _1; + } + + bb0: { ++ _5 = const false; + StorageLive(_1); + StorageLive(_2); ++ _5 = const true; + _2 = S; + StorageLive(_3); + StorageLive(_4); + _4 = S; + _3 = S::id(move _4) -> [return: bb1, unwind: bb4]; + } + + bb1: { + StorageDead(_4); ++ _5 = const false; + _1 = S::other(move _2, move _3) -> [return: bb2, unwind: bb3]; + } + + bb2: { + StorageDead(_3); ++ _5 = const false; + StorageDead(_2); + _0 = const (); + StorageDead(_1); + return; + } + + bb3 (cleanup): { +- drop(_3) -> [return: bb5, unwind terminate]; ++ goto -> bb5; + } + + bb4 (cleanup): { +- drop(_4) -> [return: bb5, unwind terminate]; ++ goto -> bb5; + } + + bb5 (cleanup): { +- drop(_2) -> [return: bb6, unwind terminate]; ++ goto -> bb8; + } + + bb6 (cleanup): { + resume; ++ } ++ ++ bb7 (cleanup): { ++ drop(_2) -> [return: bb6, unwind terminate]; ++ } ++ ++ bb8 (cleanup): { ++ switchInt(_5) -> [0: bb6, otherwise: bb7]; + } + } + |