https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70397
--- Comment #2 from vehre at gcc dot gnu.org --- Author: vehre Date: Mon Mar 28 16:29:14 2016 New Revision: 234507 URL: https://gcc.gnu.org/viewcvs?rev=234507&root=gcc&view=rev Log: gcc/fortran/ChangeLog: 2016-03-28 Andre Vehreschild <ve...@gcc.gnu.org> PR fortran/70397 * trans-expr.c (gfc_class_len_or_zero_get): Add function to return a constant zero tree, when the class to get the _len component from is not unlimited polymorphic. (gfc_copy_class_to_class): Use the new function. * trans.h: Added interface of new function gfc_class_len_or_zero_get. gcc/testsuite/ChangeLog: 2016-03-28 Andre Vehreschild <ve...@gcc.gnu.org> PR fortran/70397 * gfortran.dg/unlimited_polymorphic_25.f90: New test. * gfortran.dg/unlimited_polymorphic_26.f90: New test. Added: branches/gcc-5-branch/gcc/testsuite/gfortran.dg/unlimited_polymorphic_25.f90 branches/gcc-5-branch/gcc/testsuite/gfortran.dg/unlimited_polymorphic_26.f90 Modified: branches/gcc-5-branch/gcc/fortran/ChangeLog branches/gcc-5-branch/gcc/fortran/trans-expr.c branches/gcc-5-branch/gcc/fortran/trans.h branches/gcc-5-branch/gcc/testsuite/ChangeLog