blob: ef5464147202538a366b3e69c1da9c840fd82238 [file] [log] [blame]
#![feature(rustc_attrs)]
#[rustc_builtin_macro]
macro_rules! asm {
() => {}
}
fn main() {
unsafe {
asm!("nop", options(nomem, nomem)); // { dg-error "the 'nomem' option was already provided" }
asm!("nop", options(noreturn, noreturn)); // { dg-error "the 'noreturn' option was already provided" }
asm!("nop", options(xxx)); // { dg-error "expected one of '\\)', 'att_syntax', 'may_unwind', 'nomem', 'noreturn', 'nostack', 'preserves_flags', 'pure', 'raw', or 'readonly', found 'xxx'" }
asm!("nop", options(+)); // { dg-error "expected one of '\\)', 'att_syntax', 'may_unwind', 'nomem', 'noreturn', 'nostack', 'preserves_flags', 'pure', 'raw', or 'readonly', found '\\+'" }
asm!("nop", options+); // { dg-error "expected '\\(', found '\\+'" }
}
}