add clobber_abi("C") to may_unwind inline-asm tests

This commit is contained in:
cynecx 2021-11-19 22:41:16 +01:00
parent 8e9ccdf28f
commit fb35cee709
2 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@ fn main() {
let flag = &mut true;
catch_unwind(AssertUnwindSafe(|| {
let _foo = Foo(flag);
unsafe { asm!("bl _panicky", options(may_unwind)) };
unsafe { asm!("bl _panicky", clobber_abi("C"), options(may_unwind)) };
}))
.expect_err("expected a panic");
assert_eq!(*flag, false);

View File

@ -24,7 +24,7 @@ fn main() {
let flag = &mut true;
catch_unwind(AssertUnwindSafe(|| {
let _foo = Foo(flag);
unsafe { asm!("call panicky", options(may_unwind)) };
unsafe { asm!("call panicky", clobber_abi("C"), options(may_unwind)) };
}))
.expect_err("expected a panic");
assert_eq!(*flag, false);