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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119073
138bc75d-0d04-0410-961f-
82ee72b054a4
+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
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);
+2006-11-21 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/29820
+ * gfortran.dg/used_types_13.f90: New test.
+
2006-11-21 Janis Johnson <janis187@us.ibm.com>
* gcc.dg/dfp/snan.c: Delete.
--- /dev/null
+! { dg-do compile }
+! Tests the fix for PR29820, which was another problem with derived type
+! association. Not all siblings were being searched for identical types.
+!
+! Contributed by Harald Anlauf <anlauf@gmx.de>
+!
+module geo
+ type geodetic
+ real :: h
+ end type geodetic
+end module geo
+module gfcbug44
+ implicit none
+contains
+subroutine point ( gp)
+ use geo
+ type(geodetic), intent(out) :: gp
+ type(geodetic) :: gpx(1)
+ gp = gpx(1)
+end subroutine point
+subroutine plane ()
+ use geo
+ type(geodetic) :: gp
+ call point ( gp)
+end subroutine plane
+end module gfcbug44
+! { dg-final { cleanup-modules "geo gfcbug44" } }
+