Skip to content

Commit 5e58b1b

Browse files
authored
Rollup 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 03f81bf + 5566099 commit 5e58b1b

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)