Skip to content

Commit

Permalink
Rollup 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
Dylan-DPC authored Jul 18, 2022
2 parents 03f81bf + 5566099 commit 5e58b1b
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/test/ui/asm/issue-96797.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// build-pass
// compile-flags: -O
// min-llvm-version: 14.0.5

// 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 5e58b1b

Please sign in to comment.