]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: Add test to confirm Rust-GCC/gccrs#3922 fix
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Tue, 2 Sep 2025 19:28:00 +0000 (21:28 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Thu, 30 Oct 2025 19:59:10 +0000 (20:59 +0100)
gcc/testsuite/ChangeLog:

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

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/testsuite/rust/compile/issue-3922.rs [new file with mode: 0644]

diff --git a/gcc/testsuite/rust/compile/issue-3922.rs b/gcc/testsuite/rust/compile/issue-3922.rs
new file mode 100644 (file)
index 0000000..3c07f94
--- /dev/null
@@ -0,0 +1,12 @@
+struct S(
+    [u8; {
+        {
+            // { dg-error "mismatched types. expected .... but got ..integer.. .E0308." "" { target *-*-* } .-1 }
+            struct Z;
+            0
+        }
+        0
+    }],
+);
+
+fn main() {}