]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: Add new regression test
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Tue, 10 Oct 2023 14:03:45 +0000 (16:03 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 18:09:17 +0000 (19:09 +0100)
This new test highlight the fix for #2651.

gcc/testsuite/ChangeLog:

* rust/compile/macro_rules_macro_rules.rs: New test.

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

diff --git a/gcc/testsuite/rust/compile/macro_rules_macro_rules.rs b/gcc/testsuite/rust/compile/macro_rules_macro_rules.rs
new file mode 100644 (file)
index 0000000..ecd1712
--- /dev/null
@@ -0,0 +1,10 @@
+macro_rules! macro_rules {
+    () => {
+        struct S;
+    };
+}
+macro_rules! {} // calls the macro defined above
+
+fn main() {
+    let _s = S;
+}