diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2008-11-19 03:25:00 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2008-11-19 03:25:00 +0000 |
commit | 81a7154e5792c6ee7530935c21a1a0e6d06104d3 (patch) | |
tree | e4d3c15eb094e5a0086a3c78d6da347e58194382 /gcc | |
parent | 517c7381286aa99e0b04aef6a64d24c7e526a468 (diff) | |
download | gcc-81a7154e5792c6ee7530935c21a1a0e6d06104d3.zip gcc-81a7154e5792c6ee7530935c21a1a0e6d06104d3.tar.gz gcc-81a7154e5792c6ee7530935c21a1a0e6d06104d3.tar.bz2 |
re PR fortran/38119 (character ICE in gfc_trans_create_temp_array)
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-19 Paul Thomas <pault@gcc.gnu.org>
* gfortran.dg/module_equivalence_6.f90: New test.
From-SVN: r141990
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/module.c | 6 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/module_equivalence_6.f90 | 22 |
4 files changed, 36 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 69d8df2..352cc31 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +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 diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index b9c99fe..35f5ce5 100644 --- a/gcc/fortran/module.c +++ b/gcc/fortran/module.c @@ -3807,12 +3807,14 @@ load_equiv (void) } /* 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; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4f49d7f..135ca37 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +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 diff --git a/gcc/testsuite/gfortran.dg/module_equivalence_6.f90 b/gcc/testsuite/gfortran.dg/module_equivalence_6.f90 new file mode 100644 index 0000000..8c8049e --- /dev/null +++ b/gcc/testsuite/gfortran.dg/module_equivalence_6.f90 @@ -0,0 +1,22 @@ +! { 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" } } |