]> git.lizzy.rs Git - rust.git/blob - src/test/ui/simple_global_asm.rs
Auto merge of #67000 - spastorino:remove-promoted-from-place, r=oli-obk
[rust.git] / src / test / ui / simple_global_asm.rs
1 // run-pass
2
3 #![feature(global_asm)]
4 #![feature(naked_functions)]
5 #![allow(dead_code)]
6
7 #[cfg(any(target_arch = "x86_64", target_arch = "x86"))]
8 global_asm!(r#"
9     .global foo
10     .global _foo
11 foo:
12 _foo:
13     ret
14 "#);
15
16 extern {
17     fn foo();
18 }
19
20 #[cfg(any(target_arch = "x86_64", target_arch = "x86"))]
21 fn main() { unsafe { foo(); } }
22
23 #[cfg(not(any(target_arch = "x86_64", target_arch = "x86")))]
24 fn main() {}