]> git.lizzy.rs Git - rust.git/blob - tests/codegen/issue-58881.rs
Auto merge of #106294 - Nilstrieb:noundef-everything, r=nikic
[rust.git] / tests / codegen / issue-58881.rs
1 // compile-flags: -C no-prepopulate-passes -Copt-level=0
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 }