Add test for issue 99071
This commit is contained in:
parent
e51f1b7e27
commit
dfe68eede3
21
src/test/ui/asm/issue-99071.rs
Normal file
21
src/test/ui/asm/issue-99071.rs
Normal 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
|
||||
}
|
||||
}
|
8
src/test/ui/asm/issue-99071.stderr
Normal file
8
src/test/ui/asm/issue-99071.stderr
Normal 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
|
||||
|
Loading…
Reference in New Issue
Block a user