Skip to content

Commit

Permalink
add clobber_abi("C") to may_unwind inline-asm tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cynecx committed Dec 3, 2021
1 parent 8e9ccdf commit fb35cee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/test/ui/asm/aarch64/may_unwind.rs
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/asm/x86_64/may_unwind.rs
Expand Up @@ -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);
Expand Down

0 comments on commit fb35cee

Please sign in to comment.