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

gcc/testsuite/ChangeLog:

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

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

diff --git a/gcc/testsuite/rust/compile/issue-3524.rs b/gcc/testsuite/rust/compile/issue-3524.rs
new file mode 100644 (file)
index 0000000..62c8c35
--- /dev/null
@@ -0,0 +1,9 @@
+struct A {}
+// { dg-warning "struct is never constructed" "" { target *-*-* } .-1 }
+
+impl A {
+    fn main() {}
+    // { dg-warning "associated function is never used: .main." "" { target *-*-* } .-1 }
+}
+
+fn main() {}