This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/30554] [4.2 and 4.1 only] ICE in mio_pointer_ref at module.c:1945



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]