]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: test: add a regression test for issue Rust-GCC/gccrs#4145
author0xllx0 <github+elle@weathered-steel.dev>
Tue, 30 Sep 2025 15:17:24 +0000 (15:17 +0000)
committerArthur Cohen <arthur.cohen@embecosm.com>
Thu, 30 Oct 2025 20:30:55 +0000 (21:30 +0100)
gcc/testsuite/ChangeLog:

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

Signed-off-by: Elle Rhumsaa <elle@weathered-steel.dev>
gcc/testsuite/rust/compile/issue-4145.rs [new file with mode: 0644]

diff --git a/gcc/testsuite/rust/compile/issue-4145.rs b/gcc/testsuite/rust/compile/issue-4145.rs
new file mode 100644 (file)
index 0000000..98b33ca
--- /dev/null
@@ -0,0 +1,13 @@
+// { dg-excess-errors "warnings" }
+
+struct S {
+    field: [u8; {
+        #[path = "outer/inner.rs"]
+        // { dg-warning "error handling module file for .inner." "#4145" { xfail *-*-* } .+1 }
+        mod inner;
+        // OK
+        0
+    }],
+}
+
+fn main() {}