]> git.lizzy.rs Git - rust.git/blob - tests/codegen/issue-56267-2.rs
Rollup merge of #106106 - jyn514:remote-tracking-branch, r=Mark-Simulacrum
[rust.git] / tests / codegen / issue-56267-2.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 load from bar.1 should have alignment 4. Not checking
12 // other loads here, as the alignment will be platform-dependent.
13
14 // CHECK: %{{.+}} = load i32, {{i32\*|ptr}} %{{.+}}, align 4
15 #[no_mangle]
16 pub fn test(x: Foo<(i32, i32)>) -> (i32, i32) {
17     x.bar
18 }