]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: add test case to show issue is fixed
authorPhilip Herron <herron.philip@googlemail.com>
Fri, 11 Jul 2025 09:16:36 +0000 (10:16 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 5 Aug 2025 14:36:55 +0000 (16:36 +0200)
Fixes Rust-GCC#3599

gcc/testsuite/ChangeLog:

* rust/compile/issue-3599.rs: New test.

Signed-off-by: Philip Herron <herron.philip@googlemail.com>
gcc/testsuite/rust/compile/issue-3599.rs [new file with mode: 0644]

diff --git a/gcc/testsuite/rust/compile/issue-3599.rs b/gcc/testsuite/rust/compile/issue-3599.rs
new file mode 100644 (file)
index 0000000..1d29fac
--- /dev/null
@@ -0,0 +1,8 @@
+#[lang = "sized"]
+trait Sized {}
+
+trait Bar {}
+
+struct S; // { dg-warning "struct is never constructed" }
+
+pub fn test(foo: impl Bar) {}