]> git.lizzy.rs Git - rust.git/blob - src/test/codegen/repr-transparent-aggregates-3.rs
Remove licenses
[rust.git] / src / test / codegen / repr-transparent-aggregates-3.rs
1 // compile-flags: -C no-prepopulate-passes
2
3 // only-mips64
4 // See repr-transparent.rs
5
6 #![crate_type="lib"]
7
8
9 #[repr(C)]
10 pub struct Big([u32; 16]);
11
12 #[repr(transparent)]
13 pub struct BigW(Big);
14
15 // CHECK: define void @test_Big(%Big* [[BIG_RET_ATTRS:.*]], [8 x i64]
16 #[no_mangle]
17 pub extern fn test_Big(_: Big) -> Big { loop {} }
18
19 // CHECK: define void @test_BigW(%BigW* [[BIG_RET_ATTRS]], [8 x i64]
20 #[no_mangle]
21 pub extern fn test_BigW(_: BigW) -> BigW { loop {} }
22
23
24 #[repr(C)]
25 pub union BigU {
26     foo: [u32; 16],
27 }
28
29 #[repr(transparent)]
30 pub struct BigUw(BigU);
31
32 // CHECK: define void @test_BigU(%BigU* [[BIGU_RET_ATTRS:.*]], [8 x i64]
33 #[no_mangle]
34 pub extern fn test_BigU(_: BigU) -> BigU { loop {} }
35
36 // CHECK: define void @test_BigUw(%BigUw* [[BIGU_RET_ATTRS]], [8 x i64]
37 #[no_mangle]
38 pub extern fn test_BigUw(_: BigUw) -> BigUw { loop {} }