]> git.lizzy.rs Git - rust.git/blob - src/test/ui/asm/x86_64/issue-96797.rs
Rollup merge of #98200 - ouz-a:issue-98177, r=oli-obk
[rust.git] / src / test / ui / asm / x86_64 / issue-96797.rs
1 // build-pass
2 // compile-flags: -O
3 // min-llvm-version: 14.0.5
4 // needs-asm-support
5 // only-x86_64
6 // only-linux
7
8 // regression test for #96797
9
10 #![feature(asm_sym)]
11
12 use std::arch::global_asm;
13
14 #[no_mangle]
15 fn my_func() {}
16
17 global_asm!("call_foobar: jmp {}", sym foobar);
18
19 fn foobar() {}
20
21 fn main() {
22     extern "Rust" {
23         fn call_foobar();
24     }
25     unsafe { call_foobar() };
26 }