rust/tests/crashes/124375.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
296 B
Rust
Raw Normal View History

2024-04-26 10:20:16 -05:00
//@ known-bug: #124375
//@ compile-flags: -Zmir-opt-level=0
//@ only-x86_64
#![crate_type = "lib"]
#![feature(naked_functions)]
2024-09-05 10:48:13 -05:00
use std::arch::naked_asm;
2024-04-26 10:20:16 -05:00
#[naked]
pub unsafe extern "C" fn naked_with_args_and_return(a: isize, b: isize) -> isize {
2024-09-05 10:48:13 -05:00
naked_asm!("lea rax, [rdi + rsi]", "ret");
2024-04-26 10:20:16 -05:00
}