https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92533
--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> --- (In reply to Tobias Burnus from comment #4) > Probably somewhere in module.c's gfc_use_module. That's actually to early. gfc_use_module is run after all use statements have been processed while the public/private statement comes much later. Additionally for (cf. comment 1) use B use C the information that a symbol has been loaded from B and/or C is lost – only the true module ("A") remains. But we need to know later on that the symbol has been loaded via B *and* C such that with "private :: B; public :: C" the symbols are properly marked as public. Hence, some tracking of the use-associated symbols until either resolving them or until writing them to the .mod is needed – some kind of (symbol, list-of-modules) container or (module, list-of-symbols)