about summary refs log tree commit diff
path: root/tests/ui/asm/issue-97490.rs
blob: 5f364a22bc43729b9e4a3579c895d15c6868b734 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//@ check-pass
//@ only-x86_64
//@ needs-asm-support

pub type Yes = extern "sysv64" fn(&'static u8) -> !;

fn main() {
    unsafe {
        let yes = &6 as *const _ as *const Yes;
        core::arch::asm!("call {}", in(reg) yes, options(noreturn));
    }
}