public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-7949] gccrs: Add regression test for nested macros
@ 2024-01-16 18:09 Arthur Cohen
  0 siblings, 0 replies; only message in thread
From: Arthur Cohen @ 2024-01-16 18:09 UTC (permalink / raw)
  To: gcc-cvs

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

commit r14-7949-ga289b3614defa2745842a58df23ca11fff583332
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date:   Wed Aug 30 17:11:24 2023 +0200

    gccrs: Add regression test for nested macros
    
    Add a new test to avoid regression on newly added changes about macros
    expanding to new macro definitions.
    
    gcc/testsuite/ChangeLog:
    
            * rust/compile/nested_macro_definition.rs: New test.
    
    Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>

Diff:
---
 gcc/testsuite/rust/compile/nested_macro_definition.rs | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/gcc/testsuite/rust/compile/nested_macro_definition.rs b/gcc/testsuite/rust/compile/nested_macro_definition.rs
new file mode 100644
index 00000000000..c0b72506acc
--- /dev/null
+++ b/gcc/testsuite/rust/compile/nested_macro_definition.rs
@@ -0,0 +1,16 @@
+// { dg-options "-frust-name-resolution-2.0" }
+
+macro_rules! toto {
+    () => {
+        macro_rules! tata {
+            () => {
+                let _i = 0;
+            };
+        }
+    };
+}
+
+pub fn main() {
+    toto!();
+    tata!();
+}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-16 18:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-16 18:09 [gcc r14-7949] gccrs: Add regression test for nested macros Arthur Cohen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).