https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84546
--- Comment #5 from Paul Thomas <pault at gcc dot gnu.org> --- Author: pault Date: Sun Mar 11 22:25:11 2018 New Revision: 258438 URL: https://gcc.gnu.org/viewcvs?rev=258438&root=gcc&view=rev Log: 2018-03-11 Paul Thomas <pa...@gcc.gnu.org> PR fortran/84546 * trans-array.c (structure_alloc_comps): Make sure that the vptr is copied and that the unlimited polymorphic _len is used to compute the size to be allocated. * trans-expr.c (gfc_get_class_array_ref): If unlimited, use the unlimited polymorphic _len for the offset to the element. (gfc_copy_class_to_class): Set the new 'unlimited' argument. * trans.h : Add the boolean 'unlimited' to the prototype. 2018-03-11 Paul Thomas <pa...@gcc.gnu.org> PR fortran/84546 * gfortran.dg/unlimited_polymorphic_29.f90 : New test. Added: trunk/gcc/testsuite/gfortran.dg/unlimited_polymorphic_29.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/trans-array.c trunk/gcc/fortran/trans-expr.c trunk/gcc/fortran/trans.h trunk/gcc/testsuite/ChangeLog