diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2007-01-29 10:27:50 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2007-01-29 10:27:50 +0000 |
commit | aec78e730e868938b44e1c73eb248595a6a97fd9 (patch) | |
tree | 949e338e3757cb36d165fae79e228cdac199a817 /gcc/fortran/module.c | |
parent | 098b68ad539fb491c024ed60f783581970bb20b3 (diff) | |
download | gcc-aec78e730e868938b44e1c73eb248595a6a97fd9.zip gcc-aec78e730e868938b44e1c73eb248595a6a97fd9.tar.gz gcc-aec78e730e868938b44e1c73eb248595a6a97fd9.tar.bz2 |
re PR fortran/30554 ([4.1 only] ICE in mio_pointer_ref at module.c:1945)
2007-01-29 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30554
* module.c (read_module): If a symbol is excluded by an ONLY
clause, check to see if there is a symtree already loaded. If
so, attach the symtree to the pointer_info.
2007-01-29 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30554
* gfortran.dg/used_dummy_types_6.f90: New test.
From-SVN: r121281
Diffstat (limited to 'gcc/fortran/module.c')
-rw-r--r-- | gcc/fortran/module.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index 1eed5e7..e76bd0e 100644 --- a/gcc/fortran/module.c +++ b/gcc/fortran/module.c @@ -3394,15 +3394,22 @@ read_module (void) /* Get the jth local name for this symbol. */ p = find_use_name_n (name, &j); - /* Skip symtree nodes not in an ONLY clause. */ + /* Skip symtree nodes not in an ONLY clause, unless there + is an existing symtree loaded from another USE + statement. */ if (p == NULL) - continue; + { + st = gfc_find_symtree (gfc_current_ns->sym_root, name); + if (st != NULL) + info->u.rsym.symtree = st; + continue; + } - /* Check for ambiguous symbols. */ st = gfc_find_symtree (gfc_current_ns->sym_root, p); if (st != NULL) { + /* Check for ambiguous symbols. */ if (st->n.sym != info->u.rsym.sym) st->ambiguous = 1; info->u.rsym.symtree = st; |