diff options
| author | bors <bors@rust-lang.org> | 2022-07-21 13:40:28 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-07-21 13:40:28 +0000 |
| commit | 1673f1450eeaf4a5452e086db0fe2ae274a0144f (patch) | |
| tree | 9fb8453af6ffe8b0a0bf13a851457868ca5d9e4b | |
| parent | 74f600b990240556c9a355c5d03293a10934bd1b (diff) | |
| parent | 4423341263f08ec989050a2a6746d748ebae20cf (diff) | |
| download | rust-1673f1450eeaf4a5452e086db0fe2ae274a0144f.tar.gz rust-1673f1450eeaf4a5452e086db0fe2ae274a0144f.zip | |
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
| -rw-r--r-- | src/test/ui/asm/x86_64/issue-96797.rs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/test/ui/asm/x86_64/issue-96797.rs b/src/test/ui/asm/x86_64/issue-96797.rs new file mode 100644 index 00000000000..d3e0906f37a --- /dev/null +++ b/src/test/ui/asm/x86_64/issue-96797.rs @@ -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() }; +} |
