From 4547b622d8d29df964fa2914213088b148c498fc Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:18:32 +0200 Subject: Merging upstream version 1.67.1+dfsg1. Signed-off-by: Daniel Baumann --- src/test/mir-opt/inline/asm_unwind.rs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/test/mir-opt/inline/asm_unwind.rs (limited to 'src/test/mir-opt/inline/asm_unwind.rs') diff --git a/src/test/mir-opt/inline/asm_unwind.rs b/src/test/mir-opt/inline/asm_unwind.rs new file mode 100644 index 000000000..c03feb433 --- /dev/null +++ b/src/test/mir-opt/inline/asm_unwind.rs @@ -0,0 +1,22 @@ +// Tests inlining of `may_unwind` inline assembly. +// +// ignore-wasm32-bare compiled with panic=abort by default +// needs-asm-support +#![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(); +} -- cgit v1.2.3