]> git.proxmox.com Git - rustc.git/blob - src/test/ui/llvm-asm/llvm-asm-parse-errors.rs
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / src / test / ui / llvm-asm / llvm-asm-parse-errors.rs
1 #![feature(llvm_asm)]
2 #![allow(deprecated)] // llvm_asm!
3
4 fn main() {
5 llvm_asm!(); //~ ERROR requires a string literal as an argument
6 llvm_asm!("nop" : struct); //~ ERROR expected string literal
7 llvm_asm!("mov %eax, $$0x2" : struct); //~ ERROR expected string literal
8 llvm_asm!("mov %eax, $$0x2" : "={eax}" struct); //~ ERROR expected `(`
9 llvm_asm!("mov %eax, $$0x2" : "={eax}"(struct)); //~ ERROR expected expression
10 llvm_asm!("in %dx, %al" : "={al}"(result) : struct); //~ ERROR expected string literal
11 llvm_asm!("in %dx, %al" : "={al}"(result) : "{dx}" struct); //~ ERROR expected `(`
12 llvm_asm!("in %dx, %al" : "={al}"(result) : "{dx}"(struct)); //~ ERROR expected expression
13 llvm_asm!("mov $$0x200, %eax" : : : struct); //~ ERROR expected string literal
14 llvm_asm!("mov eax, 2" : "={eax}"(foo) : : : struct); //~ ERROR expected string literal
15 llvm_asm!(123); //~ ERROR inline assembly must be a string literal
16 }