]> git.lizzy.rs Git - rust.git/blob - src/test/ui/asm/asm-bad-clobber.rs
Rollup merge of #57132 - daxpedda:master, r=steveklabnik
[rust.git] / src / test / ui / asm / asm-bad-clobber.rs
1 // ignore-android
2 // ignore-arm
3 // ignore-aarch64
4 // ignore-s390x
5 // ignore-emscripten
6 // ignore-powerpc
7 // ignore-powerpc64
8 // ignore-powerpc64le
9 // ignore-sparc
10 // ignore-sparc64
11 // ignore-mips
12 // ignore-mips64
13
14 #![feature(asm)]
15
16 #[cfg(any(target_arch = "x86",
17           target_arch = "x86_64"))]
18
19 pub fn main() {
20     unsafe {
21         // clobber formatted as register input/output
22         asm!("xor %eax, %eax" : : : "{eax}");
23         //~^ ERROR clobber should not be surrounded by braces
24     }
25 }