diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2008-10-05 05:50:00 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2008-10-05 05:50:00 +0000 |
commit | ee9ef10338020843b9df3c21297bd1c61bbd45b4 (patch) | |
tree | c7a1d5d6f65455a78af957007fe5a13885133b75 /gcc/fortran/module.c | |
parent | 7f23df4ebbb5d8e0f585501b2a702bd59d7bc16e (diff) | |
download | gcc-ee9ef10338020843b9df3c21297bd1c61bbd45b4.zip gcc-ee9ef10338020843b9df3c21297bd1c61bbd45b4.tar.gz gcc-ee9ef10338020843b9df3c21297bd1c61bbd45b4.tar.bz2 |
re PR fortran/37706 (ICE with use only and equivalent)
2008-10-04 Paul Thomas <pault@gcc.gnu.org>
PR fortran/37706
* module.c (load_equiv): Check the module before negating the
unused flag.
2008-10-04 Paul Thomas <pault@gcc.gnu.org>
PR fortran/37706
* gfortran.dg/module_equivalence_4.f90: New test.
From-SVN: r140879
Diffstat (limited to 'gcc/fortran/module.c')
-rw-r--r-- | gcc/fortran/module.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index 762114c..3846d95 100644 --- a/gcc/fortran/module.c +++ b/gcc/fortran/module.c @@ -3806,11 +3806,14 @@ load_equiv (void) mio_expr (&tail->expr); } - /* Unused equivalence members have a unique name. */ + /* Unused equivalence members have a unique name. In addition, it + must be checked that the symbol is that from the module. */ unused = true; for (eq = head; eq; eq = eq->eq) { - if (!check_unique_name (eq->expr->symtree->name)) + if (eq->expr->symtree->n.sym->module + && strcmp (module_name, eq->expr->symtree->n.sym->module) == 0 + && !check_unique_name (eq->expr->symtree->name)) { unused = false; break; |