]>
git.proxmox.com Git - rustc.git/blob - tests/codegen/abi-repr-ext.rs
3 // revisions:x86_64 i686 aarch64-apple aarch64-windows aarch64-linux arm riscv
5 //[x86_64] compile-flags: --target x86_64-unknown-uefi
6 //[x86_64] needs-llvm-components: x86
7 //[i686] compile-flags: --target i686-unknown-linux-musl
8 //[i686] needs-llvm-components: x86
9 //[aarch64-windows] compile-flags: --target aarch64-pc-windows-msvc
10 //[aarch64-windows] needs-llvm-components: aarch64
11 //[aarch64-linux] compile-flags: --target aarch64-unknown-linux-gnu
12 //[aarch64-linux] needs-llvm-components: aarch64
13 //[aarch64-apple] compile-flags: --target aarch64-apple-darwin
14 //[aarch64-apple] needs-llvm-components: aarch64
15 //[arm] compile-flags: --target armv7r-none-eabi
16 //[arm] needs-llvm-components: arm
17 //[riscv] compile-flags: --target riscv64gc-unknown-none-elf
18 //[riscv] needs-llvm-components: riscv
20 // See bottom of file for a corresponding C source file that is meant to yield
21 // equivalent declarations.
22 #![feature(no_core, lang_items)]
23 #![crate_type = "lib"]
27 #[lang="sized"] trait Sized { }
28 #[lang="freeze"] trait Freeze { }
29 #[lang="copy"] trait Copy { }
37 // To accommodate rust#97800, one might consider writing the below as:
39 // `define{{( dso_local)?}} noundef{{( signext)?}} i8 @test()`
41 // but based on rust#80556, it seems important to actually check for the
42 // presence of the `signext` for those targets where we expect it.
44 // CHECK: define{{( dso_local)?}} noundef
45 // x86_64-SAME: signext
46 // aarch64-apple-SAME: signext
47 // aarch64-windows-NOT: signext
48 // aarch64-linux-NOT: signext
50 // riscv-SAME: signext
51 // CHECK-SAME: i8 @test()
55 pub extern "C" fn test() -> Type
{