+2010-11-08 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/46344
+ * trans-types.c (gfc_copy_dt_decls_ifequal): Handle CLASS components.
+
2010-11-06 Janus Weil <janus@gcc.gnu.org>
PR fortran/46330
for (; to_cm; to_cm = to_cm->next, from_cm = from_cm->next)
{
to_cm->backend_decl = from_cm->backend_decl;
- if ((!from_cm->attr.pointer || from_gsym)
- && from_cm->ts.type == BT_DERIVED)
+ if (from_cm->ts.type == BT_DERIVED
+ && (!from_cm->attr.pointer || from_gsym))
+ gfc_get_derived_type (to_cm->ts.u.derived);
+ else if (from_cm->ts.type == BT_CLASS
+ && (!CLASS_DATA (from_cm)->attr.class_pointer || from_gsym))
gfc_get_derived_type (to_cm->ts.u.derived);
-
else if (from_cm->ts.type == BT_CHARACTER)
to_cm->ts.u.cl->backend_decl = from_cm->ts.u.cl->backend_decl;
}
+2010-11-08 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/46344
+ * gfortran.dg/class_28.f03: New.
+
2010-11-08 Andrey Belevantsev <abel@ispras.ru>
PR rtl-optimization/45352
--- /dev/null
+! { dg-do compile }
+!
+! PR 46344: [4.6 Regression] [OOP] ICE with allocatable CLASS components
+!
+! Contributed by Salvatore Filippone <sfilippone@uniroma2.it>
+
+module m
+
+ type t1
+ end type
+
+ type t2
+ class(t1), allocatable :: cc
+ end type
+
+ class(t2), allocatable :: sm
+
+end module m
+
+program p
+ use m
+ implicit none
+
+ type(t2), allocatable :: x(:)
+
+ allocate(x(1))
+
+end program p
+
+! { dg-final { cleanup-modules "m" } }