https://gcc.gnu.org/g:d93b5d3aa0c2566fe0442d68a8aa358afef2d1ad

commit r17-1086-gd93b5d3aa0c2566fe0442d68a8aa358afef2d1ad
Author: Harishankar <[email protected]>
Date:   Thu May 7 16:31:05 2026 +0530

    gccrs: testsuite: Add a testcase for issue 4159
    
    gcc/testsuite/ChangeLog:
            * rust/compile/issue-4159.rs: New test
    
    Signed-off-by: Harishankar <[email protected]>

Diff:
---
 gcc/testsuite/rust/compile/issue-4159.rs | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/gcc/testsuite/rust/compile/issue-4159.rs 
b/gcc/testsuite/rust/compile/issue-4159.rs
new file mode 100644
index 000000000000..cac69a48a398
--- /dev/null
+++ b/gcc/testsuite/rust/compile/issue-4159.rs
@@ -0,0 +1,12 @@
+#![feature(no_core)]
+#![no_core]
+#![feature()]
+macro_rules! m {
+    () => ( c.. ); // { dg-error "token type .* cannot be parsed as range 
pattern bound" }
+}
+fn main() {
+    match [1, 1, 2] {
+        [ c1 ] => {}
+        [ m!() ] => {}
+    }
+}
\ No newline at end of file

Reply via email to