fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.0 KiB27 linesraw
1// only-aarch64
2// needs-asm-support
3// run-rustfix
4
5use std::arch::asm;
6
7fn main() {
8    unsafe {
9        asm!("", options(nomem, ));
10        //~^ ERROR the `nomem` option was already provided
11        asm!("", options(preserves_flags, ));
12        //~^ ERROR the `preserves_flags` option was already provided
13        asm!("", options(nostack, preserves_flags), options());
14        //~^ ERROR the `nostack` option was already provided
15        asm!("", options(nostack, ), options(), options());
16        //~^ ERROR the `nostack` option was already provided
17        //~| ERROR the `nostack` option was already provided
18        //~| ERROR the `nostack` option was already provided
19        asm!(
20            "",
21            options(nomem, noreturn),
22            options(preserves_flags, ), //~ ERROR the `noreturn` option was already provided
23            options( nostack),            //~ ERROR the `nomem` option was already provided
24            options(),                  //~ ERROR the `noreturn` option was already provided
25        );
26    }
27}