This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, Fortran, committed] Free loop and gfc_ss data


Hello,

On 22/08/2012 07:56, Tobias Burnus wrote:
> Committed as Rev. 190586 after successful regtesting.
> 
> That's the version I also had attached to
> http://gcc.gnu.org/ml/fortran/2012-08/msg00118.html; as written there:
I have one minor comment about it. See below.
> 
> "The patch is incomplete, e.g. "argss" of gfc_conv_procedure_call is not
> (or not always) freed. Ditto for rss of gfc_trans_assignment_1; 
>From glancing at the code, I don't see why rss is not freed by
gfc_cleanup_loop for the latter.


> Index: gcc/fortran/trans-expr.c
> ===================================================================
> --- gcc/fortran/trans-expr.c	(Revision 190585)
> +++ gcc/fortran/trans-expr.c	(Arbeitskopie)
> @@ -6770,6 +6771,7 @@ gfc_trans_arrayfunc_assign (gfc_expr * expr1, gfc_
>        if (!expr2->value.function.isym)
>  	{
>  	  realloc_lhs_loop_for_fcn_call (&se, &expr1->where, &ss, &loop);
> +	  gfc_cleanup_loop (&loop);
>  	  ss->is_alloc_lhs = 1;
>  	}
>        else
This takes care of freeing ss along the way, but ss should be freed
outside of the conditional too.

Mikael


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]