+2008-11-19 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/38119
+ * module.c (load_equiv): Regression fix; check that equivalence
+ members come from the same module only.
+
2008-11-16 Mikael Morin <mikael.morin@tele2.fr>
PR fortran/35681
}
/* Unused equivalence members have a unique name. In addition, it
- must be checked that the symbol is that from the module. */
+ must be checked that the symbols are from the same module. */
unused = true;
for (eq = head; eq; eq = eq->eq)
{
if (eq->expr->symtree->n.sym->module
- && strcmp (module_name, eq->expr->symtree->n.sym->module) == 0
+ && head->expr->symtree->n.sym->module
+ && strcmp (head->expr->symtree->n.sym->module,
+ eq->expr->symtree->n.sym->module) == 0
&& !check_unique_name (eq->expr->symtree->name))
{
unused = false;
+2008-11-19 Paul Thomas <pault@gcc.gnu.org>
+
+ * gfortran.dg/module_equivalence_6.f90: New test.
+
2008-11-18 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/38051
--- /dev/null
+! { dg-do compile }
+!
+! Fixes PR38171 a regression caused by the fix for PR37706.
+!
+! Contributed by Scot Breitenfeld <brtnfld@hdfgroup.org>
+!
+MODULE H5GLOBAL
+ IMPLICIT NONE
+ INTEGER :: H5P_flags
+ INTEGER :: H5P_DEFAULT_F
+ EQUIVALENCE(H5P_flags, H5P_DEFAULT_F)
+END MODULE H5GLOBAL
+MODULE HDF5
+ USE H5GLOBAL
+END MODULE HDF5
+PROGRAM fortranlibtest
+ USE HDF5
+ IMPLICIT NONE
+ INTEGER :: ii
+ ii = H5P_DEFAULT_F
+END PROGRAM fortranlibtest
+! { dg-final { cleanup-modules "H5GLOBAL HD5" } }