Skip to content

Commit 96d4e0b

Browse files
committed
Add test for #29988
1 parent 339f574 commit 96d4e0b

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// compile-flags: -C no-prepopulate-passes
2+
// Regression test for #29988
3+
4+
#[repr(C)]
5+
struct S {
6+
f1: i32,
7+
f2: i32,
8+
f3: i32,
9+
}
10+
11+
extern {
12+
fn foo(s: S);
13+
}
14+
15+
fn main() {
16+
let s = S { f1: 1, f2: 2, f3: 3 };
17+
unsafe {
18+
// CHECK: load { i64, i32 }, { i64, i32 }* {{.*}}, align 4
19+
// CHECK: call void @foo({ i64, i32 } {{.*}})
20+
foo(s);
21+
}
22+
}

0 commit comments

Comments
 (0)