+2013-02-22 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/56385
+ * trans-array.c (structure_alloc_comps): Handle procedure-pointer
+ components with allocatable result.
+
2013-02-17 Tobias Burnus <burnus@net-b.de>
Mikael Morin <mikael@gcc.gnu.org>
called_dealloc_with_status = false;
gfc_init_block (&tmpblock);
- if (c->attr.allocatable
- && (c->attr.dimension || c->attr.codimension))
+ if (c->attr.allocatable && (c->attr.dimension || c->attr.codimension)
+ && !c->attr.proc_pointer)
{
comp = fold_build3_loc (input_location, COMPONENT_REF, ctype,
decl, cdecl, NULL_TREE);
continue;
}
- if (c->attr.allocatable && !cmp_has_alloc_comps)
+ if (c->attr.allocatable && !c->attr.proc_pointer
+ && !cmp_has_alloc_comps)
{
rank = c->as ? c->as->rank : 0;
tmp = gfc_duplicate_allocatable (dcmp, comp, ctype, rank);
+2013-02-22 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/56385
+ * gfortran.dg/proc_ptr_comp_37.f90: New.
+
2013-02-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Backport from mainline:
--- /dev/null
+! { dg-do compile }
+!
+! PR 56385: [4.6/4.7/4.8 Regression] [OOP] ICE with allocatable function result in a procedure-pointer component
+!
+! Contributed by Vladimir Fuka <vladimir.fuka@gmail.com>
+
+ implicit none
+
+ type :: TGeometricShape
+ end type
+
+ type :: TVolumeSourceBody
+ class(TGeometricShape), allocatable :: GeometricShape
+ procedure(scalar_flux_interface), pointer :: get_scalar_flux
+ end type
+
+ abstract interface
+ function scalar_flux_interface(self) result(res)
+ import
+ real, allocatable :: res(:)
+ class(TVolumeSourceBody), intent(in) :: self
+ end function
+ end interface
+
+end