aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2023-10-17 14:56:09 +0200
committerP-E-P <32375388+P-E-P@users.noreply.github.com>2023-10-17 14:07:33 +0000
commitc3b68b53f27c766dfe8987ed3d279c603582443c (patch)
tree0e8e3b7475a3f8d7ecdcf42afc5e7c7d0ddb44dc /gcc
parent9762e0915b19d05843396a7d065c88fe1775db3e (diff)
downloadgcc-c3b68b53f27c766dfe8987ed3d279c603582443c.zip
gcc-c3b68b53f27c766dfe8987ed3d279c603582443c.tar.gz
gcc-c3b68b53f27c766dfe8987ed3d279c603582443c.tar.bz2
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>
Diffstat (limited to 'gcc')
-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!();