https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94660
Jeff Hole <gnu.gcc.detection675 at passmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gnu.gcc.detection675@passma | |il.com --- Comment #4 from Jeff Hole <gnu.gcc.detection675 at passmail dot com> --- Created attachment 56807 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56807&action=edit clue: combining modules into a single file gives expected results Here's an interesting clue: the correct results occur when all the modules are stored in the same source file (note, all modules are still separate, just in the same file). This is certainly not a solution, but it does provide a clue to the problem, as well as and a way to get things working the way you want. Ultimately, it is necessary that this works across separate module source files so that we separate compilation steps and enable extensions of these types beyond the single source file. I compiled with gfortran: GNU Fortran (GCC) 10.3.1 20210422 (Red Hat 10.3.1-1) I attached tarball "buginnspg-clue.tar".