diff --git a/gcc/testsuite/rust/compile/invalid_variadics.rs b/gcc/testsuite/rust/compile/invalid_variadics.rs new file mode 100644 index 000000000000..5706b673791b --- /dev/null +++ b/gcc/testsuite/rust/compile/invalid_variadics.rs @@ -0,0 +1,6 @@ +extern "C" { + pub fn dog(b: i32, a: ..., c: i32); + // { dg-error "..... must be the last argument of a C-variadic function" "" { target *-*-* } .-1 } + pub fn cat(a: ...); + // { dg-error "C-variadic function must be declared with at least one named argument" "" { target *-*-* } .-1 } +}