From c3b68b53f27c766dfe8987ed3d279c603582443c Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Patry Date: Tue, 17 Oct 2023 14:56:09 +0200 Subject: [PATCH] Add a new test for mbe named macro_rules Macro rules named macro_rules may cause some problems if not handled correctly. This new test ensure we always compile those macros named macro_rules correctly as well as other macro definitions. gcc/testsuite/ChangeLog: * rust/compile/macro57.rs: New test. Signed-off-by: Pierre-Emmanuel Patry --- gcc/testsuite/rust/compile/macro57.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 gcc/testsuite/rust/compile/macro57.rs diff --git a/gcc/testsuite/rust/compile/macro57.rs b/gcc/testsuite/rust/compile/macro57.rs new file mode 100644 index 000000000000..0640d2f83052 --- /dev/null +++ b/gcc/testsuite/rust/compile/macro57.rs @@ -0,0 +1,13 @@ +macro_rules! macro_rules { + () => {}; +} + +macro_rules! foo { + () => {}; +} + +foo!(); + +fn main() {} + +macro_rules!();