]> git.lizzy.rs Git - rust.git/blob - tests/codegen/issue-56267.rs
Rollup merge of #106638 - RalfJung:realstd, r=thomcc
[rust.git] / tests / codegen / issue-56267.rs
1 // compile-flags: -C no-prepopulate-passes
2
3 #![crate_type="rlib"]
4
5 #[allow(dead_code)]
6 pub struct Foo<T> {
7     foo: u64,
8     bar: T,
9 }
10
11 // The store writing to bar.1 should have alignment 4. Not checking
12 // other stores here, as the alignment will be platform-dependent.
13
14 // CHECK: store i32 [[TMP1:%.+]], {{i32\*|ptr}} [[TMP2:%.+]], align 4
15 #[no_mangle]
16 pub fn test(x: (i32, i32)) -> Foo<(i32, i32)> {
17     Foo { foo: 0, bar: x }
18 }