rust/src/test/ui/asm/rustfix-asm.fixed
Adam Gemmell 6d218d02d9 Add inline asm! tests for aarch64
Enable tests which are largely architecture-independent on all supported
platforms
2021-09-24 16:23:37 +00:00

17 lines
411 B
Rust

// run-rustfix
// needs-asm-support
#![feature(asm, llvm_asm)]
#![allow(deprecated)] // llvm_asm!
fn main() {
unsafe {
let x = 1;
let y: i32;
llvm_asm!("" :: "r" (x));
//~^ ERROR the legacy LLVM-style asm! syntax is no longer supported
llvm_asm!("" : "=r" (y));
//~^ ERROR the legacy LLVM-style asm! syntax is no longer supported
let _ = y;
}
}