From 6658219e9b66f918d24befbea7d80de486817fb3 Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Patry Date: Tue, 10 Oct 2023 14:53:39 +0200 Subject: [PATCH] Add a new regression test for macro call "default" This test highlight the fix required for #2655. gcc/testsuite/ChangeLog: * rust/compile/parse_item_default_macro.rs: New test. Signed-off-by: Pierre-Emmanuel Patry --- gcc/testsuite/rust/compile/parse_item_default_macro.rs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 gcc/testsuite/rust/compile/parse_item_default_macro.rs diff --git a/gcc/testsuite/rust/compile/parse_item_default_macro.rs b/gcc/testsuite/rust/compile/parse_item_default_macro.rs new file mode 100644 index 000000000000..3e632695c12d --- /dev/null +++ b/gcc/testsuite/rust/compile/parse_item_default_macro.rs @@ -0,0 +1,8 @@ +// { dg-additional-options "-frust-compile-until=ast" } +macro_rules! default { + ($($x:tt)*) => { $($x)* } +} + +default! { + struct A; +}