------- Comment #1 from pault at gcc dot gnu dot org  2007-07-05 15:24 -------
This fixes it but is, as yet, unregtested:

Index: gcc/fortran/module.c
===================================================================
*** gcc/fortran/module.c        (revision 126317)
--- gcc/fortran/module.c        (working copy)
*************** write_operator (gfc_user_op *uop)
*** 3943,3948 ****
--- 3943,3951 ----
  static void
  write_generic (gfc_symbol *sym)
  {
+   const char *p;
+   int nuse, j;
+
    if (sym->generic == NULL
        || !gfc_check_access (sym->attr.access, sym->ns->default_access))
      return;
*************** write_generic (gfc_symbol *sym)
*** 3950,3956 ****
    if (sym->module == NULL)
      sym->module = gfc_get_string (module_name);

!   mio_symbol_interface (&sym->name, &sym->module, &sym->generic);
  }


--- 3953,3971 ----
    if (sym->module == NULL)
      sym->module = gfc_get_string (module_name);

!   /* See how many use names there are.  If none, go through the start
!        of the loop at least once.  */
!   nuse = number_use_names (sym->name);
!   if (nuse == 0)
!     nuse = 1;
!
!   for (j = 1; j <= nuse; j++)
!     {
!       /* Get the jth local name for this symbol.  */
!       p = find_use_name_n (sym->name, &j);
!
!       mio_symbol_interface (&p, &sym->module, &sym->generic);
!     }
  }


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32634

Reply via email to