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

--- Comment #1 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Thanks for the bug report.  This works on the gcc-16 development branch, it
looks like a bugfix should be backported.  Although there is no obvious bugfix
in the changelog.  It maybe that this behaviour changed during spell check
enhancements.

Here is the same test code compiled using gm2 (16):

$ cat m1.mod m1.def
IMPLEMENTATION MODULE m1;

        MODULE inner1;

        EXPORT P1;

        PROCEDURE P1;

        END P1;

        END inner1;

        MODULE inner2;

        FROM inner1 IMPORT P1;

        END inner2;
END m1.
DEFINITION MODULE m1 ;

END m1.
new-gcc-bash ~/GCC/badimport$ gm2 m1.mod 
new-gcc-bash ~/GCC/badimport$ ./a.out 
new-gcc-bash ~/GCC/badimport$ gm2 --version
gm2 (GCC) 16.0.0 20260108 (experimental)
Copyright (C) 2026 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Reply via email to