https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67721
--- Comment #2 from Mikael Morin <mikael at gcc dot gnu.org> --- Author: mikael Date: Sat Sep 26 20:34:39 2015 New Revision: 228170 URL: https://gcc.gnu.org/viewcvs?rev=228170&root=gcc&view=rev Log: Fix missing deep copy when assigning a DT constructor to an array This adds the missing deep copy when assiging a constructor of a derived type with allocatable components to an array. The check for consantness is removed so that the deep_copy argument passed to gfc_trans_scalar_assign is set to true. PR fortran/67721 gcc/fortran/ * trans-expr.c (gfc_trans_assignment_1): Remove the non-constantness condition guarding deep copy. gcc/testsuite/ * gfortran.dg/alloc_comp_deep_copy_3.f03: New. Added: trunk/gcc/testsuite/gfortran.dg/alloc_comp_deep_copy_3.f03 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/trans-expr.c trunk/gcc/testsuite/ChangeLog