https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82992
Harald Anlauf <anlauf at gmx dot de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |anlauf at gmx dot de --- Comment #2 from Harald Anlauf <anlauf at gmx dot de> --- Obvious fix for the ICE: Index: gcc/fortran/module.c =================================================================== --- gcc/fortran/module.c (revision 256858) +++ gcc/fortran/module.c (working copy) @@ -6597,7 +6597,7 @@ gfc_symbol *sym; tmp_symtree = gfc_find_symtree (gfc_current_ns->sym_root, name); - if (tmp_symtree != NULL) + if (tmp_symtree != NULL && tmp_symtree->n.sym && tmp_symtree->n.sym->module) { if (strcmp (modname, tmp_symtree->n.sym->module) == 0) return;