]> git.lizzy.rs Git - rust.git/blob - src/test/ui/asm/issue-85247.rs
Rollup merge of #99570 - XrXr:box-from-slice-docs, r=thomcc
[rust.git] / src / test / ui / asm / issue-85247.rs
1 // revisions: ropi rwpi
2
3 // [ropi] compile-flags: --target armv7-unknown-linux-gnueabihf -C relocation-model=ropi
4 // [rwpi] compile-flags: --target armv7-unknown-linux-gnueabihf -C relocation-model=rwpi
5 // [ropi] needs-llvm-components: arm
6 // [rwpi] needs-llvm-components: arm
7 // [ropi] build-pass
8
9 #![feature(no_core, lang_items, rustc_attrs)]
10 #![no_core]
11 #![crate_type = "rlib"]
12
13 #[rustc_builtin_macro]
14 macro_rules! asm {
15     () => {};
16 }
17 #[lang = "sized"]
18 trait Sized {}
19
20 // R9 is reserved as the RWPI base register
21 fn main() {
22     unsafe {
23         asm!("", out("r9") _);
24         //[rwpi]~^ cannot use register `r9`
25     }
26 }