Hi Paul, with the two changes mentioned on IRC ok by me. Thanks for the patch.
Regards, Andre On Sun, 17 Jan 2016 11:17:08 +0100 Paul Richard Thomas <paul.richard.tho...@gmail.com> wrote: > Dear Mikael, > > I have gathered together the applicable patches to fix this PR on > 5-branch. In so doing, the testcase for PR66082 was added > (alloc_comp_auto_array_3.f90), since a change was made for this PR. I > found that this leaked memory, of course, and so I have added the fix > for PR66082. I have checked that all the memory leaks mentioned in the > PR comments are fixed. The change in allocate_with_source_14.f03 is a > bit mysterious but I checked that it doesn't lose memory, so no harm > is done. > > Bootstrapped and regtested on FC21/x86_64 - OK for 5-branch? (I > thought to commit it today, if that is OK?) > > Cheers > > Paul > > 2016-01-17 Mikael Morin <mik...@gcc.gnu.org> > > Backport from trunk. > PR fortran/61831 > * gfortran.dg/derived_constructor_components_6.f90: New file. > * gfortran.dg/allocate_with_source_14.f03: Change count of > __builtin_malloc from 21 to 23. > > 2016-01-17 Paul Thomas <pa...@gcc.gnu.org> > > Backport from trunk. > PR fortran/66082 > * gfortran.dg/alloc_comp_auto_array_3.f90: New file. Count of > __builtin_malloc increased from 3 to 4, relative to trunk. > > 2016-01-17 Mikael Morin <mik...@gcc.gnu.org> > Dominique d'Humieres <domi...@lps.ens.fr> > > Backport from trunk. > PR fortran/61831 > * trans-array.c (gfc_conv_array_parameter): Guard allocatable > component deallocation code generation with descriptorless > calling convention flag. > * trans-expr.c (gfc_conv_expr_reference): Remove allocatable > component deallocation code generation from revision 212329. > (expr_may_alias_variables): New function. > (gfc_conv_procedure_call): New boolean elemental_proc to factor > check for procedure elemental-ness. Rename boolean f to nodesc_arg > and declare it in the outer scope. Use expr_may_alias_variables, > elemental_proc and nodesc_arg to decide whether generate allocatable > component deallocation code. > (gfc_trans_subarray_assign): Set deep copy flag. > > 2016-01-17 Paul Thomas <pa...@gcc.gnu.org> > > Backport from trunk. > PR fortran/66082 > * trans-array.c (gfc_conv_array_parameter): Ensure that all > non-variable arrays with allocatable components have the > components deallocated after the procedure call. > > -- Andre Vehreschild * Email: vehre ad gmx dot de