aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/module.c
diff options
context:
space:
mode:
authorPaul Thomas <pault@gcc.gnu.org>2008-03-09 19:38:51 +0000
committerPaul Thomas <pault@gcc.gnu.org>2008-03-09 19:38:51 +0000
commit81c109530cdca59546cf13346588e5a8e48ec074 (patch)
treef16e6056a26aa61c3d1da107510fbc2a9e3df577 /gcc/fortran/module.c
parent802e3f8c818a594430066173ab0beb8bde96a74a (diff)
downloadgcc-81c109530cdca59546cf13346588e5a8e48ec074.zip
gcc-81c109530cdca59546cf13346588e5a8e48ec074.tar.gz
gcc-81c109530cdca59546cf13346588e5a8e48ec074.tar.bz2
re PR fortran/35474 (Reading module file with COMMON and EQUIVALENCE)
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 Paul Thomas <pault@gcc.gnu.org> PR fortran/35474 * gfortran.dg/module_commons_2.f90 : New test. From-SVN: r133063
Diffstat (limited to 'gcc/fortran/module.c')
-rw-r--r--gcc/fortran/module.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c
index e9303a4..bc45e9e 100644
--- a/gcc/fortran/module.c
+++ b/gcc/fortran/module.c
@@ -2310,6 +2310,12 @@ mio_symtree_ref (gfc_symtree **stp)
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)