------- Comment #10 from pault at gcc dot gnu dot org 2007-02-03 21:11 ------- This fixes the problem and regtests OK:
Index: gcc/fortran/module.c =================================================================== *** gcc/fortran/module.c (revision 121540) --- gcc/fortran/module.c (working copy) *************** write_symtree (gfc_symtree *st) *** 3757,3771 **** pointer_info *p; sym = st->n.sym; ! if (!gfc_check_access (sym->attr.access, sym->ns->default_access) ! || (sym->attr.flavor == FL_PROCEDURE && sym->attr.generic ! && !sym->attr.subroutine && !sym->attr.function)) return; if (check_unique_name (st->name)) return; p = find_pointer (sym); if (p == NULL) gfc_internal_error ("write_symtree(): Symbol not written"); --- 3757,3776 ---- pointer_info *p; sym = st->n.sym; ! if (!sym->attr.use_assoc ! && (!gfc_check_access (sym->attr.access, sym->ns->default_access) ! || (sym->attr.flavor == FL_PROCEDURE && sym->attr.generic ! && !sym->attr.subroutine && !sym->attr.function))) return; if (check_unique_name (st->name)) return; p = find_pointer (sym); + + if (p == NULL && sym->attr.use_assoc) + return; + if (p == NULL) gfc_internal_error ("write_symtree(): Symbol not written"); I need to examine the part of the standard that deals with PRIVATE and PUBLIC in modules to see if this really is right. Watch this space. Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30554