+2007-07-12 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/32634
+ PR fortran/32727
+ * module.c (write_generic): Restore patch of 2007-07-10 and use
+ symbol name if there are no use names.
+
2007-07-12 Christopher D. Rickett <crickett@lanl.gov>
PR fortran/32599
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;
if (sym->module == NULL)
sym->module = gfc_get_string (module_name);
- mio_symbol_interface (&sym->name, &sym->module, &sym->generic);
+ /* See how many use names there are. If none, use the symbol name. */
+ nuse = number_use_names (sym->name);
+ if (nuse == 0)
+ {
+ mio_symbol_interface (&sym->name, &sym->module, &sym->generic);
+ return;
+ }
+
+ 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);
+ }
}
+2007-07-12 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/32727
+ * gfortran.dg/interface_17.f90: New test.
+
2007-07-12 Christopher D. Rickett <crickett@lanl.gov>
PR fortran/32599
--- /dev/null
+! { dg-do compile }
+! Tests the fix for PR32727, which was a regression caused
+! by the fix for PR32634
+!
+! Contributed by Joost VandeVondele <jv244@cam.ac.uk>
+!
+MODULE kinds
+ INTEGER, PARAMETER :: dp = SELECTED_REAL_KIND ( 14, 200 )
+END MODULE kinds
+
+MODULE util
+ USE kinds, ONLY: dp
+ INTERFACE sort
+ MODULE PROCEDURE sort2
+ END INTERFACE
+CONTAINS
+ SUBROUTINE sort2 ( )
+ END SUBROUTINE sort2
+END MODULE util
+
+MODULE graphcon
+ USE util, ONLY: sort
+END MODULE graphcon
+! { dg-final { cleanup-modules "kinds util graphcon" } }