[gcc r14-8047] gccrs: Add a new regression test for macro call "default"

Arthur Cohen cohenarthur@gcc.gnu.org
Tue Jan 16 18:14:00 GMT 2024


https://gcc.gnu.org/g:c7eb1002c61cc6016ac0180d3691224de081e0a5

commit r14-8047-gc7eb1002c61cc6016ac0180d3691224de081e0a5
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date:   Tue Oct 10 14:53:39 2023 +0200

    gccrs: 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 <pierre-emmanuel.patry@embecosm.com>

Diff:
---
 gcc/testsuite/rust/compile/parse_item_default_macro.rs | 8 ++++++++
 1 file changed, 8 insertions(+)

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 00000000000..3e632695c12
--- /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;
+}


More information about the Gcc-cvs mailing list