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

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Paul Thomas <[email protected]>:

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

commit r17-3892-gd9a9628046f7c1e70d56c082e3f2cec034415298
Author: Paul Thomas <[email protected]>
Date:   Thu Sep 3 11:10:49 2026 +0100

    Fortran: Fix ex-module inherited PDT parameter namespaces [PR104750]

    2026-09-03 Amir Shahmoradi  <[email protected]>
               Paul Thomas  <[email protected]>

    gcc/fortran
            PR fortran/104750
            * module.cc (mio_full_f2k_derived) : Instead of transferring
            the sym_root from the formal namespace, call mio_f2k_derived so
            that all required symbols and references are fully loaded.
            (read_cleanup): Restore named symtree entries for referenced
            PDT type specification parameters during module cleanup, while
            preserving existing handling for ordinary hidden symbols and
            ignoring formal parameters without namespaces.
            (fixup_pdt_parameter_namespaces): A new function that transfers
            the namespace of locally declared PDT type specification parms
            to the derived-type namespace after skipping inherited parameters,
            preserving the existing namespace ownership and ref counting.
            (read_module): Call the new fcn after read_cleanup, so that the
            required symbol and formal-parameter information has been fully
            reconstructed first.

    gcc/testsuite
            PR fortran/104750
            * gfortran.dg/pdt_93.f90: New test.

Reply via email to