From: Owen Avery Date: Mon, 13 Feb 2023 16:29:07 +0000 (-0500) Subject: gccrs: Add test X-Git-Tag: basepoints/gcc-14~116 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8a9886a85ea36788c329bba05eeeb00fca5f9a13;p=thirdparty%2Fgcc.git gccrs: Add test gcc/testsuite/ChangeLog: * rust/compile/variadic.rs: New test. Signed-off-by: Owen Avery --- diff --git a/gcc/testsuite/rust/compile/variadic.rs b/gcc/testsuite/rust/compile/variadic.rs new file mode 100644 index 000000000000..886341b088cb --- /dev/null +++ b/gcc/testsuite/rust/compile/variadic.rs @@ -0,0 +1,8 @@ +extern "C" { + fn printf(s: *const i8, ...); +} + +fn main() { + // { dg-error "expected .c_int. variadic argument" "" { target *-*-* } .+1 } + printf("%d\n" as *const str as *const i8, 1i8); +}