PR fortran/35474
* module.c (mio_symtree_ref): After providing a symbol for a
missing equivalence member, resolve and NULL the fixups.
2008-03-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/35474
* gfortran.dg/module_commons_2.f90 : New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@133063
138bc75d-0d04-0410-961f-
82ee72b054a4
+2008-03-09 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/35474
+ * module.c (mio_symtree_ref): After providing a symbol for a
+ missing equivalence member, resolve and NULL the fixups.
+
2008-03-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* invoke.texi (Error and Warning Options): Document
p->u.rsym.symtree->n.sym = p->u.rsym.sym;
p->u.rsym.symtree->n.sym->refs++;
p->u.rsym.referenced = 1;
+
+ /* If the symbol is PRIVATE and in COMMON, load_commons will
+ generate a fixup symbol, which must be associated. */
+ if (p->fixup)
+ resolve_fixups (p->fixup, p->u.rsym.sym);
+ p->fixup = NULL;
}
if (p->type == P_UNKNOWN)
+2008-03-09 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/35474
+ * gfortran.dg/module_commons_2.f90: New test.
+
2008-03-09 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/frame_overflow.adb: Improve portability.
--- /dev/null
+! { dg-do compile }
+! Tests the fix for PR35474, in which the PRIVATE statement would
+! cause the error Internal Error at (1): free_pi_tree(): Unresolved fixup
+! This arose because the symbol for 'i' emanating from the COMMON was
+! not being fixed-up as the EQUIVALENCE was built.
+!
+! Contributed by FX Coudert <fxcoudert@gcc.gnu.org>
+!
+module h5global
+ integer i
+ integer j
+ common /c/ i
+ equivalence (i, j)
+ private
+end module h5global
+
+program bug
+ use h5global
+end
+
+! { dg-final { cleanup-modules "h5global" } }