diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2006-11-21 23:42:17 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2006-11-21 23:42:17 +0000 |
commit | da2a24c3f60194266096c3b807798fbc20d38a7f (patch) | |
tree | 4a0682b92c6d4b0d966b0bdbe1c9ef2e7610d2a3 /gcc/fortran | |
parent | 887af464cde973b03e4e95ee3ad13a5c2ea076d8 (diff) | |
download | gcc-da2a24c3f60194266096c3b807798fbc20d38a7f.zip gcc-da2a24c3f60194266096c3b807798fbc20d38a7f.tar.gz gcc-da2a24c3f60194266096c3b807798fbc20d38a7f.tar.bz2 |
re PR fortran/29820 (ICE in fold_convert, at fold-const.c:2146)
2006-11-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29820
* trans-array.c (gfc_get_derived_type): Once done, spread the
backend_decl to all identical derived types in all sibling
namespaces.
2006-11-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29820
* gfortran.dg/used_types_13.f90: New test.
From-SVN: r119073
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/fortran/trans-types.c | 7 |
2 files changed, 9 insertions, 5 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 4a30d00..bfc6d6d 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2006-11-21 Paul Thomas <pault@gcc.gnu.org> + + PR fortran/29820 + * trans-array.c (gfc_get_derived_type): Once done, spread the + backend_decl to all identical derived types in all sibling + namespaces. + 2006-11-20 Tobias Burnus <burnus@net-b.de> PR fortran/27546 diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c index f0c41bb..b1eeffc 100644 --- a/gcc/fortran/trans-types.c +++ b/gcc/fortran/trans-types.c @@ -1608,11 +1608,8 @@ gfc_get_derived_type (gfc_symbol * derived) other_equal_dts: /* Add this backend_decl to all the other, equal derived types and their components in this and sibling namespaces. */ - - for (dt = derived->ns->derived_types; dt; dt = dt->next) - copy_dt_decls_ifequal (derived, dt->derived); - - for (ns = derived->ns->sibling; ns; ns = ns->sibling) + ns = derived->ns->parent ? derived->ns->parent->contained : derived->ns; + for (; ns; ns = ns->sibling) for (dt = ns->derived_types; dt; dt = dt->next) copy_dt_decls_ifequal (derived, dt->derived); |