Le 03/06/2013 12:22, Tobias Burnus a écrit : > * PING * > > Attached is just a re-diff. > > OK for the trunk? > Hello, it looks good; one question below...
> diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c > index 100ec18..7521dee 100644 > --- a/gcc/fortran/trans-decl.c > +++ b/gcc/fortran/trans-decl.c > @@ -3872,7 +3892,8 @@ gfc_trans_deferred_vars (gfc_symbol * proc_sym, > gfc_wrapped_block * block) > > /* Deallocate when leaving the scope. Nullifying is not > needed. */ > - if (!sym->attr.result && !sym->attr.dummy) > + if (!sym->attr.result && !sym->attr.dummy > + && !sym->ns->proc_name->attr.is_main_program) > No check for !sym->attr.save here? There are several places through the patch where we check whether a variable needs end of scope automatic deallocation. Might be worth factoring the checks to a common predicate. The patch is OK in any case; thanks. Mikael