aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/inline_asm_faulty_clobber.rs
blob: ea3dac7734e2f703d2823c75641a7008cfa86c40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#![feature(rustc_attrs)]

#[rustc_builtin_macro]
macro_rules! asm {
    () => {}
}

fn main() {
    unsafe {
        asm!("nop", clobber_abi());  // { dg-error "at least one abi must be provided as an argument to 'clobber_abi'" }
        asm!("nop", clobber_abi+);  // { dg-error "expected '\\(', found '\\+'" }
        asm!("nop", clobber_abi);  // { dg-error "expected '\\(', found end of macro arguments" }
    }
}