Debian Codegraph @

gcc/testsuite/rust/compile/inline_asm_illegal_options.rs

raw
1 #![feature(rustc_attrs)]
2
3 #[rustc_builtin_macro]
4 macro_rules! asm {
5 () => {}
6 }
7
8 fn main() {
9 unsafe {
10 asm!("nop", options(nomem, nomem)); // { dg-error "the 'nomem' option was already provided" }
11 asm!("nop", options(noreturn, noreturn)); // { dg-error "the 'noreturn' option was already provided" }
12 asm!("nop", options(xxx)); // { dg-error "expected one of '\\)', 'att_syntax', 'may_unwind', 'nomem', 'noreturn', 'nostack', 'preserves_flags', 'pure', 'raw', or 'readonly', found 'xxx'" }
13 asm!("nop", options(+)); // { dg-error "expected one of '\\)', 'att_syntax', 'may_unwind', 'nomem', 'noreturn', 'nostack', 'preserves_flags', 'pure', 'raw', or 'readonly', found '\\+'" }
14 asm!("nop", options+); // { dg-error "expected '\\(', found '\\+'" }
15 }
16 }