Skip to content

Commit 4641af3

Browse files
committed
add clobber_abi("C") to may_unwind inline-asm tests
1 parent 0f637b8 commit 4641af3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/test/ui/asm/aarch64/may_unwind.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ fn main() {
2424
let flag = &mut true;
2525
catch_unwind(AssertUnwindSafe(|| {
2626
let _foo = Foo(flag);
27-
unsafe { asm!("bl _panicky", options(may_unwind)) };
27+
unsafe { asm!("bl _panicky", clobber_abi("C"), options(may_unwind)) };
2828
}))
2929
.expect_err("expected a panic");
3030
assert_eq!(*flag, false);

src/test/ui/asm/x86_64/may_unwind.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ fn main() {
2424
let flag = &mut true;
2525
catch_unwind(AssertUnwindSafe(|| {
2626
let _foo = Foo(flag);
27-
unsafe { asm!("call panicky", options(may_unwind)) };
27+
unsafe { asm!("call panicky", clobber_abi("C"), options(may_unwind)) };
2828
}))
2929
.expect_err("expected a panic");
3030
assert_eq!(*flag, false);

0 commit comments

Comments
 (0)