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

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

https://gcc.gnu.org/g:2ce11ed2a2f4eeae68a5cb059307be8153448d8d

commit r17-4639-g2ce11ed2a2f4eeae68a5cb059307be8153448d8d
Author: Gaius Mulley <[email protected]>
Date:   Fri Sep 25 07:38:57 2026 +0100

    PR modula2/127567: Import in local module cannot import an external module

    This patch allows a local import to import an external library
    module providing it was imported by the main module.  See
    tinygoodimport.mod for clarity.

    gcc/m2/ChangeLog:

            PR modula2/127567
            * gm2-compiler/P1SymBuild.mod (BuildImportInnerModule): Call
            PutImported if sym is a defimp or module.
            * gm2-compiler/SymbolConversion.def (Gcc2Mod): Correct parameter
            name.
            * gm2-compiler/SymbolConversion.mod (Gcc2Mod): Ditto.
            * gm2-compiler/SymbolTable.mod (IsExternalModule): New procedure
            function.
            (AddSymToModuleScope): Only generate an error if the symbol is
            not an external module.

    gcc/testsuite/ChangeLog:

            PR modula2/127567
            * gm2/imports/fail/tinybadimport.mod: New test.
            * gm2/imports/run/pass/tinygoodimport.mod: New test.

    Signed-off-by: Gaius Mulley <[email protected]>

Reply via email to