Skip to content

Commit

Permalink
Auto merge of #99059 - Amanieu:fix-96797, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
Add test for #96797

This was fixed in LLVM which was updated in #98285.

https://reviews.llvm.org/D127751

Fixes #96797
  • Loading branch information
bors committed Jul 21, 2022
2 parents 74f600b + 4423341 commit 1673f14
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/test/ui/asm/x86_64/issue-96797.rs
Original file line number Diff line number Diff line change
@@ -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() };
}

0 comments on commit 1673f14

Please sign in to comment.