rust/tests/mir-opt/inline/asm_unwind.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
391 B
Rust
Raw Normal View History

2022-10-07 06:59:26 -05:00
// Tests inlining of `may_unwind` inline assembly.
//
// ignore-wasm32-bare compiled with panic=abort by default
2022-10-07 12:01:17 -05:00
// needs-asm-support
2022-10-07 06:59:26 -05:00
#![feature(asm_unwind)]
struct D;
impl Drop for D {
fn drop(&mut self) {}
}
#[inline(always)]
fn foo() {
let _d = D;
unsafe { std::arch::asm!("", options(may_unwind)) };
}
// EMIT_MIR asm_unwind.main.Inline.diff
pub fn main() {
foo();
}