https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78293
--- Comment #3 from Paul Thomas <pault at gcc dot gnu.org> --- Author: pault Date: Fri Nov 25 12:23:43 2016 New Revision: 242875 URL: https://gcc.gnu.org/viewcvs?rev=242875&root=gcc&view=rev Log: 2016-11-25 Andre Vehreschild <ve...@gcc.gnu.org> Paul Thomas <pa...@gcc.gnu.org> PR fortran/78293 * trans-expr.c (gfc_conv_procedure_call): Prepend deallocation of alloctable components to post, rather than adding to se->post. * trans-stmt.c (gfc_trans_allocate): Move deallocation of expr3 allocatable components so that all expr3s are visited. 2016-11-25 Paul Thomas <pa...@gcc.gnu.org> PR fortran/78293 * gfortran.dg/allocatable_function_10.f90: New test. * gfortran.dg/class_array_15.f03: Increase builtin_free count from 11 to 12. Added: trunk/gcc/testsuite/gfortran.dg/allocatable_function_10.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/trans-expr.c trunk/gcc/fortran/trans-stmt.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gfortran.dg/class_array_15.f03