Add test for issue 99071

This commit is contained in:
Amanieu d'Antras 2022-07-11 14:47:22 +01:00
parent e51f1b7e27
commit dfe68eede3
2 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,21 @@
// compile-flags: --target thumbv6m-none-eabi
// needs-llvm-components: arm
// needs-asm-support
#![feature(no_core, lang_items, rustc_attrs)]
#![no_core]
#![crate_type = "rlib"]
#[rustc_builtin_macro]
macro_rules! asm {
() => {};
}
#[lang = "sized"]
trait Sized {}
pub fn foo() {
unsafe {
asm!("", in("r8") 0);
//~^ cannot use register `r8`: high registers (r8+) can only be used as clobbers in Thumb-1 code
}
}

View File

@ -0,0 +1,8 @@
error: cannot use register `r8`: high registers (r8+) can only be used as clobbers in Thumb-1 code
--> $DIR/issue-99071.rs:18:18
|
LL | asm!("", in("r8") 0);
| ^^^^^^^^^^
error: aborting due to previous error