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