2021-06-24 09:01:49 -05:00
|
|
|
// only-aarch64
|
2022-03-19 10:50:24 -05:00
|
|
|
// needs-asm-support
|
2020-06-16 14:32:13 -05:00
|
|
|
// run-rustfix
|
|
|
|
|
2021-12-10 18:11:10 -06:00
|
|
|
use std::arch::asm;
|
|
|
|
|
2020-06-16 14:32:13 -05:00
|
|
|
fn main() {
|
|
|
|
unsafe {
|
|
|
|
asm!("", options(nomem, ));
|
|
|
|
//~^ ERROR the `nomem` option was already provided
|
2021-06-24 09:01:49 -05:00
|
|
|
asm!("", options(preserves_flags, ));
|
|
|
|
//~^ ERROR the `preserves_flags` option was already provided
|
|
|
|
asm!("", options(nostack, preserves_flags), options());
|
2020-06-16 14:32:13 -05:00
|
|
|
//~^ ERROR the `nostack` option was already provided
|
|
|
|
asm!("", options(nostack, ), options(), options());
|
|
|
|
//~^ ERROR the `nostack` option was already provided
|
|
|
|
//~| ERROR the `nostack` option was already provided
|
|
|
|
//~| ERROR the `nostack` option was already provided
|
|
|
|
asm!(
|
|
|
|
"",
|
|
|
|
options(nomem, noreturn),
|
2021-06-24 09:01:49 -05:00
|
|
|
options(preserves_flags, ), //~ ERROR the `noreturn` option was already provided
|
2021-12-10 18:11:10 -06:00
|
|
|
options( nostack), //~ ERROR the `nomem` option was already provided
|
|
|
|
options(), //~ ERROR the `noreturn` option was already provided
|
2020-06-16 14:32:13 -05:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|