This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/30554] [4.2 and 4.1 only] ICE in mio_pointer_ref at module.c:1945
- From: "pault at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Feb 2007 21:11:09 -0000
- Subject: [Bug fortran/30554] [4.2 and 4.1 only] ICE in mio_pointer_ref at module.c:1945
- References: <bug-30554-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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