]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: Add a new regression test for macro call "default"
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Tue, 10 Oct 2023 12:53:39 +0000 (14:53 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 18:09:15 +0000 (19:09 +0100)
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 <pierre-emmanuel.patry@embecosm.com>
gcc/testsuite/rust/compile/parse_item_default_macro.rs [new file with mode: 0644]

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 (file)
index 0000000..3e63269
--- /dev/null
@@ -0,0 +1,8 @@
+// { dg-additional-options "-frust-compile-until=ast" }
+macro_rules! default {
+    ($($x:tt)*) => { $($x)* }
+}
+
+default! {
+    struct A;
+}