diff --git a/gcc/testsuite/rust/compile/non_foreign_variadic_function.rs b/gcc/testsuite/rust/compile/non_foreign_variadic_function.rs new file mode 100644 index 000000000000..2a4d3090a66b --- /dev/null +++ b/gcc/testsuite/rust/compile/non_foreign_variadic_function.rs @@ -0,0 +1,4 @@ +pub fn toto(a: i32, ...) {} +// { dg-error "only foreign or .unsafe extern .C.. functions may be C-variadic" "" { target *-*-* } .-1 } + +fn main() {}