https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83135
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |accepts-invalid
CC| |anlauf at gcc dot gnu.org
--- Comment #2 from anlauf at gcc dot gnu.org ---
In gfc_check_vardef_context we have the following check:
/* PROTECTED and use-associated. */
if (sym->attr.is_protected && sym->attr.use_assoc && check_intentin)
{
...
For the case at hand, the symbol in question has sym->attr.use_assoc = 0
but sym->attr.used_in_submodule=1 . Replacing the central condition by
(sym->attr.use_assoc || sym->attr.used_in_submodule) however creates false
positives, unless we figure out that the symbol belongs to an ancestor of
the submodule. I need to figure out how to do that...