This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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, OOP] PR 47637: Memory leak involving INTENT(OUT) CLASS argument w/ allocatable components


Small correction: The line in the test case should be

! { dg-final { scan-tree-dump-times "__builtin_free" 2 "original" } }

with "2" instead of "4". One is the auto-deallocation of "a%i" at the
end of the main program, the second is the auto-deallocation of the
intent-out argument "x%i"

Cheers,
Janus




2011/2/9 Janus Weil <janus@gcc.gnu.org>:
> Hi all,
>
> here is a small patch which takes care of auto-deallocating
> INTENT(OUT) CLASS arguments with allocatable components. Regtested on
> x86_64-unknown-linux-gnu. Ok for trunk?
>
> Cheers,
> Janus
>
>
> 2011-02-09 ?Janus Weil ?<janus@gcc.gnu.org>
>
> ? ? ? ?PR fortran/47637
> ? ? ? ?* trans-decl.c (init_intent_out_dt): Handle CLASS arguments.
>
>
> 2011-02-09 ?Janus Weil ?<janus@gcc.gnu.org>
>
> ? ? ? ?PR fortran/47637
> ? ? ? ?* gfortran.dg/auto_dealloc_2.f90
>


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