about summary refs log tree commit diff
path: root/src/test/codegen
diff options
context:
space:
mode:
authorErik Desjardins <erikdesjardins@users.noreply.github.com>2022-02-27 23:15:49 -0500
committerErik Desjardins <erikdesjardins@users.noreply.github.com>2022-02-27 23:15:49 -0500
commit0c784337494223441d53129688bd777ae8df7992 (patch)
treee3e1f5ee1df39efb6f7cafa8f14695c8de5b3668 /src/test/codegen
parent851fcc7a54262748b1aa9e16de91453998d896f3 (diff)
downloadrust-0c784337494223441d53129688bd777ae8df7992.tar.gz
rust-0c784337494223441d53129688bd777ae8df7992.zip
update vec-shrink-panik test to allow panic_no_unwind in landingpads
Diffstat (limited to 'src/test/codegen')
-rw-r--r--src/test/codegen/vec-shrink-panik.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/codegen/vec-shrink-panik.rs b/src/test/codegen/vec-shrink-panik.rs
index 6b0ac78857a..18409014bde 100644
--- a/src/test/codegen/vec-shrink-panik.rs
+++ b/src/test/codegen/vec-shrink-panik.rs
@@ -17,6 +17,14 @@ pub fn shrink_to_fit(vec: &mut Vec<u32>) {
 #[no_mangle]
 pub fn issue71861(vec: Vec<u32>) -> Box<[u32]> {
     // CHECK-NOT: panic
+
+    // Call to panic_no_unwind in case of double-panic is expected,
+    // but other panics are not.
+    // CHECK: cleanup
+    // CHECK-NEXT: ; call core::panicking::panic_no_unwind
+    // CHECK-NEXT: panic_no_unwind
+
+    // CHECK-NOT: panic
     vec.into_boxed_slice()
 }
 
@@ -24,5 +32,16 @@ pub fn issue71861(vec: Vec<u32>) -> Box<[u32]> {
 #[no_mangle]
 pub fn issue75636<'a>(iter: &[&'a str]) -> Box<[&'a str]> {
     // CHECK-NOT: panic
+
+    // Call to panic_no_unwind in case of double-panic is expected,
+    // but other panics are not.
+    // CHECK: cleanup
+    // CHECK-NEXT: ; call core::panicking::panic_no_unwind
+    // CHECK-NEXT: panic_no_unwind
+
+    // CHECK-NOT: panic
     iter.iter().copied().collect()
 }
+
+// CHECK: ; core::panicking::panic_no_unwind
+// CHECK: declare void @{{.*}}panic_no_unwind