https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120414

Nathaniel Shead <nshead at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2025-05-23
             Blocks|                            |103524
           Assignee|unassigned at gcc dot gnu.org      |nshead at gcc dot 
gnu.org
           Keywords|                            |rejects-valid
     Ever confirmed|0                           |1
                 CC|                            |nshead at gcc dot gnu.org
             Status|UNCONFIRMED                 |ASSIGNED

--- Comment #1 from Nathaniel Shead <nshead at gcc dot gnu.org> ---
Confirmed.  We error when reading an unnamed 'tt_data_member' for 'Derived'; it
looks to be that we missed handling using-decls on stream-in here.  The
following patch fixes the issue locally, I'll test it more thoroughly and
submit when I get a chance:

diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc
index 13f8770b7bd..17c040d26b0 100644
--- a/gcc/cp/module.cc
+++ b/gcc/cp/module.cc
@@ -10512,7 +10512,8 @@ trees_in::tree_node (bool is_use)
               res = lookup_field_ident (ctx, u ());

             if (!res
-                || TREE_CODE (res) != FIELD_DECL
+                || (TREE_CODE (res) != FIELD_DECL
+                    && TREE_CODE (res) != USING_DECL)
                 || DECL_CONTEXT (res) != ctx)
               res = NULL_TREE;
           }


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103524
[Bug 103524] [meta-bug] modules issue

Reply via email to