https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67900
Mikael Morin <mikael at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikael at gcc dot gnu.org
--- Comment #4 from Mikael Morin <mikael at gcc dot gnu.org> ---
(In reply to kargl from comment #2)
> Index: resolve.c
> ===================================================================
> --- resolve.c (revision 228206)
> +++ resolve.c (working copy)
> @@ -10702,7 +10702,7 @@ gfc_verify_binding_labels (gfc_symbol *s
> sym->binding_label = NULL;
>
> }
> - else if (sym->attr.flavor == FL_VARIABLE
> + else if (sym->attr.flavor == FL_VARIABLE && module
> && (strcmp (module, gsym->mod_name) != 0
> || strcmp (sym->name, gsym->sym_name) != 0))
> {
There is another instance of this a few lines down where the check for module
!= NULL existed at the time this code was introduced at r199120.
So this patch is at least consistent.