rust/src/test/ui/issues/issue-53787-inline-assembler-macro.rs
Vadim Petrochenkov f1c8673ae7 Fix issues with git converting CRLF to CR
UI tests now run on asmjs-unknown-emscripten, ignore tests with inline assembly which is not supported on emscripten targets
2019-07-27 19:22:45 +03:00

26 lines
545 B
Rust

// Regression test for Issue #53787: Fix ICE when creating a label in inline assembler with macros.
// ignore-emscripten
#![feature(asm)]
macro_rules! fake_jump {
($id:expr) => {
unsafe {
asm!(
"
jmp $0
lea eax, [ebx]
xor eax, 0xDEADBEEF
retn
$0:
"::"0"($id)::"volatile", "intel");
}
};
}
fn main() {
fake_jump!("FirstFunc"); //~ ERROR invalid value for constraint in inline assembly
println!("Hello, world!");
}