2020-05-06 12:13:20 -05:00
|
|
|
// Regression test for #29988
|
|
|
|
|
2020-05-07 10:51:13 -05:00
|
|
|
//@ compile-flags: -C no-prepopulate-passes
|
|
|
|
//@ only-x86_64
|
|
|
|
//@ ignore-windows
|
|
|
|
|
2020-05-06 12:13:20 -05:00
|
|
|
#[repr(C)]
|
|
|
|
struct S {
|
|
|
|
f1: i32,
|
|
|
|
f2: i32,
|
|
|
|
f3: i32,
|
|
|
|
}
|
|
|
|
|
2020-09-01 16:12:52 -05:00
|
|
|
extern "C" {
|
2020-05-06 12:13:20 -05:00
|
|
|
fn foo(s: S);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let s = S { f1: 1, f2: 2, f3: 3 };
|
|
|
|
unsafe {
|
2022-02-21 04:21:23 -06:00
|
|
|
// CHECK: load { i64, i32 }, {{.*}}, align 4
|
2020-05-06 12:13:20 -05:00
|
|
|
// CHECK: call void @foo({ i64, i32 } {{.*}})
|
|
|
|
foo(s);
|
|
|
|
}
|
|
|
|
}
|