Skip to content

Commit 5566099

Browse files
committed
Add test for #96797
This was fixed in LLVM which was updated in #98285. https://reviews.llvm.org/D127751 Fixes #96797
1 parent 3fcf43b commit 5566099

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

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

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// build-pass
2+
// compile-flags: -O
3+
// min-llvm-version: 14.0.5
4+
5+
// regression test for #96797
6+
7+
#![feature(asm_sym)]
8+
9+
use std::arch::global_asm;
10+
11+
#[no_mangle]
12+
fn my_func() {}
13+
14+
global_asm!("call_foobar: jmp {}", sym foobar);
15+
16+
fn foobar() {}
17+
18+
fn main() {
19+
extern "Rust" {
20+
fn call_foobar();
21+
}
22+
unsafe { call_foobar() };
23+
}

0 commit comments

Comments
 (0)