https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91519
--- Comment #7 from kargl at gcc dot gnu.org ---
Thomas, this is fixed by
% svn diff gcc/fortran/frontend-passes.c
Index: gcc/fortran/frontend-passes.c
===================================================================
--- gcc/fortran/frontend-passes.c (revision 274676)
+++ gcc/fortran/frontend-passes.c (working copy)
@@ -5391,7 +5391,7 @@ check_externals_expr (gfc_expr **ep, int *walk_subtree
return 0;
gsym = gfc_find_gsymbol (gfc_gsym_root, sym->name);
- if (gsym == NULL)
+ if (gsym == NULL || gsym->ns == NULL)
return 0;
gfc_find_symbol (sym->name, gsym->ns, 0, &def_sym);
I don't know if this is correct. The function check_externals_expr
is somewhat odd. It is declared to return int, but all return
statements are 'return 0'. This suggests to me that proper
declaration for this function is void.