Auto merge of #99059 - Amanieu:fix-96797, r=Mark-Simulacrum
Add test for #96797 This was fixed in LLVM which was updated in #98285. https://reviews.llvm.org/D127751 Fixes #96797
This commit is contained in:
commit
1673f1450e
1 changed files with 26 additions and 0 deletions
26
src/test/ui/asm/x86_64/issue-96797.rs
Normal file
26
src/test/ui/asm/x86_64/issue-96797.rs
Normal file
|
@ -0,0 +1,26 @@
|
|||
// build-pass
|
||||
// compile-flags: -O
|
||||
// min-llvm-version: 14.0.5
|
||||
// needs-asm-support
|
||||
// only-x86_64
|
||||
// only-linux
|
||||
|
||||
// regression test for #96797
|
||||
|
||||
#![feature(asm_sym)]
|
||||
|
||||
use std::arch::global_asm;
|
||||
|
||||
#[no_mangle]
|
||||
fn my_func() {}
|
||||
|
||||
global_asm!("call_foobar: jmp {}", sym foobar);
|
||||
|
||||
fn foobar() {}
|
||||
|
||||
fn main() {
|
||||
extern "Rust" {
|
||||
fn call_foobar();
|
||||
}
|
||||
unsafe { call_foobar() };
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue