1 // compile-flags: -C no-prepopulate-passes
10 // ignore-riscv64 see codegen/riscv-abi
16 // See repr-transparent.rs
18 #![feature(transparent_unions)]
23 #[derive(Clone, Copy)]
25 pub struct BigS([u32; 16]);
28 pub struct TsBigS(BigS);
40 // CHECK: define void @test_BigS(%BigS* [[BIGS_RET_ATTRS1:.*]] sret(%BigS) [[BIGS_RET_ATTRS2:.*]], [16 x i32]
42 pub extern fn test_BigS(_: BigS) -> BigS { loop {} }
44 // CHECK: define void @test_TsBigS(%TsBigS* [[BIGS_RET_ATTRS1]] sret(%TsBigS) [[BIGS_RET_ATTRS2]], [16 x i32]
46 pub extern fn test_TsBigS(_: TsBigS) -> TsBigS { loop {} }
48 // CHECK: define void @test_TuBigS(%TuBigS* [[BIGS_RET_ATTRS1]] sret(%TuBigS) [[BIGS_RET_ATTRS2]], [16 x i32]
50 pub extern fn test_TuBigS(_: TuBigS) -> TuBigS { loop {} }
52 // CHECK: define void @test_TeBigS(%"TeBigS::Variant"* [[BIGS_RET_ATTRS1]] sret(%"TeBigS::Variant") [[BIGS_RET_ATTRS2]], [16 x i32]
54 pub extern fn test_TeBigS(_: TeBigS) -> TeBigS { loop {} }
57 #[derive(Clone, Copy)]
64 pub struct TsBigU(BigU);
76 // CHECK: define void @test_BigU(%BigU* [[BIGU_RET_ATTRS1:.*]] sret(%BigU) [[BIGU_RET_ATTRS2:.*]], [16 x i32]
78 pub extern fn test_BigU(_: BigU) -> BigU { loop {} }
80 // CHECK: define void @test_TsBigU(%TsBigU* [[BIGU_RET_ATTRS1]] sret(%TsBigU) [[BIGU_RET_ATTRS2]], [16 x i32]
82 pub extern fn test_TsBigU(_: TsBigU) -> TsBigU { loop {} }
84 // CHECK: define void @test_TuBigU(%TuBigU* [[BIGU_RET_ATTRS1]] sret(%TuBigU) [[BIGU_RET_ATTRS2]], [16 x i32]
86 pub extern fn test_TuBigU(_: TuBigU) -> TuBigU { loop {} }
88 // CHECK: define void @test_TeBigU(%"TeBigU::Variant"* [[BIGU_RET_ATTRS1]] sret(%"TeBigU::Variant") [[BIGU_RET_ATTRS2]], [16 x i32]
90 pub extern fn test_TeBigU(_: TeBigU) -> TeBigU { loop {} }