diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2023-10-17 14:56:09 +0200 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-01-16 19:09:17 +0100 |
commit | 1e841fd604680b07968a9142388633fb50384e16 (patch) | |
tree | 015b82e8cb2b2fd3bd3e053af7575d6df2035a1c /gcc | |
parent | 46c84b78055325e2001ac6336f34e8ef5393db05 (diff) | |
download | gcc-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>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/rust/compile/macro57.rs | 13 |
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!(); |