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

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

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

diff --git a/gcc/testsuite/rust/compile/issue-3924.rs b/gcc/testsuite/rust/compile/issue-3924.rs
new file mode 100644 (file)
index 0000000..cc423ce
--- /dev/null
@@ -0,0 +1,6 @@
+pub fn main() {
+    const S: usize = 23 as i64;
+    // { dg-error {mismatched types, expected .usize. but got .i64.} "" { target *-*-* } .-1 }
+    [0; S];
+    ()
+}