Skip to content

Commit 1673f14

Browse files
committed
Auto merge of rust-lang#99059 - Amanieu:fix-96797, r=Mark-Simulacrum
Add test for rust-lang#96797 This was fixed in LLVM which was updated in rust-lang#98285. https://reviews.llvm.org/D127751 Fixes rust-lang#96797
2 parents 74f600b + 4423341 commit 1673f14

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

src/test/ui/asm/x86_64/issue-96797.rs

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+
}

0 commit comments

Comments
 (0)