aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2023-10-17 14:56:09 +0200
committerArthur Cohen <arthur.cohen@embecosm.com>2024-01-16 19:09:17 +0100
commit1e841fd604680b07968a9142388633fb50384e16 (patch)
tree015b82e8cb2b2fd3bd3e053af7575d6df2035a1c
parent46c84b78055325e2001ac6336f34e8ef5393db05 (diff)
downloadgcc-1e841fd604680b07968a9142388633fb50384e16.zip
gcc-1e841fd604680b07968a9142388633fb50384e16.tar.gz
gcc-1e841fd604680b07968a9142388633fb50384e16.tar.bz2
gccrs: 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 <pierre-emmanuel.patry@embecosm.com>
-rw-r--r--gcc/testsuite/rust/compile/macro57.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/rust/compile/macro57.rs b/gcc/testsuite/rust/compile/macro57.rs
new file mode 100644
index 0000000..0640d2f
--- /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!();