]> git.lizzy.rs Git - rust.git/blob - src/test/codegen/asm-may_unwind.rs
Auto merge of #93696 - Amanieu:compiler-builtins-0.1.68, r=Mark-Simulacrum
[rust.git] / src / test / codegen / asm-may_unwind.rs
1 // min-llvm-version: 13.0.0
2 // compile-flags: -O
3 // only-x86_64
4
5 #![crate_type = "rlib"]
6 #![feature(asm_unwind)]
7
8 use std::arch::asm;
9
10 #[no_mangle]
11 pub extern "C" fn panicky() {}
12
13 struct Foo;
14
15 impl Drop for Foo {
16     fn drop(&mut self) {
17         println!();
18     }
19 }
20
21 // CHECK-LABEL: @may_unwind
22 #[no_mangle]
23 pub unsafe fn may_unwind() {
24     let _m = Foo;
25     // CHECK: invoke void asm sideeffect alignstack inteldialect unwind ""
26     asm!("", options(may_unwind));
27 }