Skip to content

Commit 51203dc

Browse files
committed
Pin panic-in-drop=abort test to old pass manager
1 parent 3183443 commit 51203dc

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/test/codegen/panic-in-drop-abort.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1-
// compile-flags: -Z panic-in-drop=abort -O
1+
// compile-flags: -Z panic-in-drop=abort -O -Z new-llvm-pass-manager=no
22

33
// Ensure that unwinding code paths are eliminated from the output after
44
// optimization.
55

6+
// This test uses -Z new-llvm-pass-manager=no, because the expected optimization does not happen
7+
// on targets using SEH exceptions (i.e. MSVC) anymore. The core issue is that Rust promises that
8+
// the drop_in_place() function can't unwind, but implements it in a way that *can*, because we
9+
// currently go out of our way to allow longjmps, which also use the unwinding mechanism on MSVC
10+
// targets. We should either forbid longjmps, or not assume nounwind, making this optimization
11+
// incompatible with the current behavior of running cleanuppads on longjmp unwinding.
12+
613
// CHECK-NOT: {{(call|invoke).*}}should_not_appear_in_output
714

815
#![crate_type = "lib"]

0 commit comments

Comments
 (0)