aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2023-08-30 17:11:24 +0200
committerArthur Cohen <arthur.cohen@embecosm.com>2024-01-16 19:00:34 +0100
commita289b3614defa2745842a58df23ca11fff583332 (patch)
treeee8834a7f9b309ec694f433c930e7dc1eca29f93 /gcc
parentdfef82f273690130660acc4bf989d372c33e7528 (diff)
downloadgcc-a289b3614defa2745842a58df23ca11fff583332.zip
gcc-a289b3614defa2745842a58df23ca11fff583332.tar.gz
gcc-a289b3614defa2745842a58df23ca11fff583332.tar.bz2
gccrs: Add regression test for nested macros
Add a new test to avoid regression on newly added changes about macros expanding to new macro definitions. gcc/testsuite/ChangeLog: * rust/compile/nested_macro_definition.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/nested_macro_definition.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/rust/compile/nested_macro_definition.rs b/gcc/testsuite/rust/compile/nested_macro_definition.rs
new file mode 100644
index 0000000..c0b7250
--- /dev/null
+++ b/gcc/testsuite/rust/compile/nested_macro_definition.rs
@@ -0,0 +1,16 @@
+// { dg-options "-frust-name-resolution-2.0" }
+
+macro_rules! toto {
+ () => {
+ macro_rules! tata {
+ () => {
+ let _i = 0;
+ };
+ }
+ };
+}
+
+pub fn main() {
+ toto!();
+ tata!();
+}