diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2005-12-29 06:11:21 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2005-12-29 06:11:21 +0000 |
commit | 486fd3c90cedb06ebe160362a9e98d1166604b9c (patch) | |
tree | f48093f6a7494da506dda25e6dfbab2cf3e92673 /gcc/fortran | |
parent | b69542f7705b3d216fe85c5562fc4e81a5d90e58 (diff) | |
download | gcc-486fd3c90cedb06ebe160362a9e98d1166604b9c.zip gcc-486fd3c90cedb06ebe160362a9e98d1166604b9c.tar.gz gcc-486fd3c90cedb06ebe160362a9e98d1166604b9c.tar.bz2 |
re PR fortran/25532 (ICE in gfc_conv_component_ref, at fortran/trans-expr.c:269)
2005-12-29 Paul Thomas <pault@gcc.gnu.org>
PR fortran/25532
* trans-types.c (copy_dt_decls_ifequal): Copy declarations for
components of derived type components by recursing into
gfc_get_derived_type.
2005-12-29 Paul Thomas <pault@gcc.gnu.org>
PR fortran/25532
*gfortran.dg/host_used_types_1.f90: Check that host associated
derived type components of derived types are properly declared
in contained procedures.
From-SVN: r109138
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/fortran/trans-types.c | 11 |
2 files changed, 17 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index ae69322..73b11ea 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2005-12-29 Paul Thomas <pault@gcc.gnu.org> + + PR fortran/25532 + * trans-types.c (copy_dt_decls_ifequal): Copy declarations for + components of derived type components by recursing into + gfc_get_derived_type. + 2005-12-28 Andrew Pinski <pinskia@physics.uc.edu> PR fortran/25587 diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c index 4e6b74e..b41940c 100644 --- a/gcc/fortran/trans-types.c +++ b/gcc/fortran/trans-types.c @@ -1414,8 +1414,17 @@ copy_dt_decls_ifequal (gfc_symbol *from, gfc_symbol *to) to_cm = to->components; from_cm = from->components; + /* Copy the component declarations. If a component is itself + a derived type, we need a copy of its component declarations. + This is done by recursing into gfc_get_derived_type and + ensures that the component's component declarations have + been built. */ for (; to_cm; to_cm = to_cm->next, from_cm = from_cm->next) - to_cm->backend_decl = from_cm->backend_decl; + { + to_cm->backend_decl = from_cm->backend_decl; + if (from_cm->ts.type == BT_DERIVED) + gfc_get_derived_type (to_cm->ts.derived); + } return 1; } |