gcc/testsuite/ChangeLog:
* rust/compile/inline_asm_faulty_clobber.rs:
Wraps inline_asm tests in unsafe {}
* rust/compile/inline_asm_faulty_clobber_1.rs: likewise.
* rust/compile/inline_asm_faulty_clobber_2.rs: likewise.
* rust/compile/inline_asm_ident_first.rs: likewise.
* rust/compile/inline_asm_nop.rs: likewise.
* rust/compile/inline_asm_nop_2.rs: likewise.
}
fn main() {
- asm!("nop", clobber_abi()); // { dg-error "at least one abi must be provided as an argument to `clobber_abi`" }
+ unsafe {
+ asm!("nop", clobber_abi()); // { dg-error "at least one abi must be provided as an argument to `clobber_abi`" }
+ }
}
\ No newline at end of file
}
fn main() {
- asm!("nop", clobber_abi); // { dg-error "expected `\\(`, found end of macro arguments" }
+ unsafe {
+ asm!("nop", clobber_abi); // { dg-error "expected `\\(`, found end of macro arguments" }
+ }
}
\ No newline at end of file
}
fn main() {
- asm!("nop", clobber_abi+); // { dg-error "expected `\\(`, found `\\+`" }
+ unsafe {
+ asm!("nop", clobber_abi+); // { dg-error "expected `\\(`, found `\\+`" }
+ }
}
\ No newline at end of file
}
fn main() {
- asm!(i_am_a_dummy); // { dg-error "asm template must be a string literal" }
+ unsafe {
+ asm!(i_am_a_dummy); // { dg-error "asm template must be a string literal" }
+ }
}
\ No newline at end of file
}
fn main() {
- asm!("nop");
+ unsafe {
+ asm!("nop");
+ }
}
}
fn main() {
- asm!("nop",);
+ unsafe {
+ asm!("nop",);
+ }
}