]> git.lizzy.rs Git - rust.git/blob - src/test/codegen/issue-58881.rs
Auto merge of #100626 - Dylan-DPC:rollup-mwbm7kj, r=Dylan-DPC
[rust.git] / src / test / codegen / issue-58881.rs
1 // compile-flags: -C no-prepopulate-passes
2 //
3 // only-x86_64
4 // ignore-windows
5
6 #![crate_type = "lib"]
7
8 extern "C" {
9     fn variadic_fn(_: i32, ...);
10 }
11
12 #[repr(C)]
13 struct Foo(u8);
14 #[repr(C)]
15 struct Bar(u64, u64, u64);
16
17 // Ensure that emit arguments of the correct type.
18 pub unsafe fn test_call_variadic() {
19     // CHECK: call void (i32, ...) @variadic_fn(i32 0, i8 {{.*}}, {{%Bar\*|ptr}} {{.*}})
20     variadic_fn(0, Foo(0), Bar(0, 0, 0))
21 }