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
|
2020-06-13 19:59:13 -05:00
|
|
|
|
2021-12-09 18:15:33 -06:00
|
|
|
use std::arch::asm;
|
2020-06-13 19:59:13 -05:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
unsafe {
|
|
|
|
asm!("", options(nomem, nomem));
|
2020-06-14 15:38:09 -05:00
|
|
|
//~^ ERROR the `nomem` option was already provided
|
2021-06-24 09:01:49 -05: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 15:38:09 -05:00
|
|
|
//~^ ERROR the `nostack` option was already provided
|
2020-06-13 19:59:13 -05:00
|
|
|
asm!("", options(nostack, nostack), options(nostack), options(nostack));
|
2020-06-14 15:38:09 -05: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 14:03:19 -05:00
|
|
|
asm!(
|
|
|
|
"",
|
|
|
|
options(nomem, noreturn),
|
2021-06-24 09:01:49 -05:00
|
|
|
options(preserves_flags, noreturn), //~ ERROR the `noreturn` option was already provided
|
2021-12-09 18:15:33 -06:00
|
|
|
options(nomem, nostack), //~ ERROR the `nomem` option was already provided
|
|
|
|
options(noreturn), //~ ERROR the `noreturn` option was already provided
|
2020-06-16 14:03:19 -05:00
|
|
|
);
|
2020-06-13 19:59:13 -05:00
|
|
|
}
|
|
|
|
}
|