diff options
Diffstat (limited to 'src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs')
| -rw-r--r-- | src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs b/src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs new file mode 100644 index 00000000000..9f5662cbd1e --- /dev/null +++ b/src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs @@ -0,0 +1,25 @@ +// ignore-android +// ignore-arm +// ignore-aarch64 +// ignore-s390x +// ignore-emscripten +// ignore-powerpc +// ignore-powerpc64 +// ignore-powerpc64le +// ignore-sparc +// ignore-sparc64 +// ignore-mips +// ignore-mips64 + +#![feature(llvm_asm)] + +#[cfg(any(target_arch = "x86", + target_arch = "x86_64"))] + +pub fn main() { + unsafe { + // clobber formatted as register input/output + llvm_asm!("xor %eax, %eax" : : : "{eax}"); + //~^ ERROR clobber should not be surrounded by braces + } +} |
