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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |16.0
             Status|UNCONFIRMED                 |ASSIGNED
           Keywords|                            |rejects-valid
           Assignee|unassigned at gcc dot gnu.org      |nshead at gcc dot 
gnu.org
   Last reconfirmed|                            |2026-03-01
             Blocks|                            |103524
                 CC|                            |nshead at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Nathaniel Shead <nshead at gcc dot gnu.org> ---
Confirmed.  Issue is specifically when doing 'import A' before 'import :Part';
the other way around things work fine.

Difference seems to be because when we first see C through A, we don't bother
re-importing through :Part, and so we don't include the linemap table within B.
 But because we still consider it to be a direct import (via :Part), when
attempting to read the import location we fail because we haven't loaded its
linemap entry yet.  

I expect a solution will probably be to adjust B to include the linemap entries
for direct imports also via partitions.


Referenced Bugs:

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

Reply via email to