From 9762e0915b19d05843396a7d065c88fe1775db3e Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Patry Date: Tue, 10 Oct 2023 16:03:45 +0200 Subject: [PATCH] Add new regression test 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 --- gcc/testsuite/rust/compile/macro_rules_macro_rules.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 gcc/testsuite/rust/compile/macro_rules_macro_rules.rs 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 index 000000000000..ecd1712c94ae --- /dev/null +++ b/gcc/testsuite/rust/compile/macro_rules_macro_rules.rs @@ -0,0 +1,10 @@ +macro_rules! macro_rules { + () => { + struct S; + }; +} +macro_rules! {} // calls the macro defined above + +fn main() { + let _s = S; +}