This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/63473] Memory leak with ALLOCATABLE, INTENT(OUT) dummy arguments.
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 16 Dec 2014 15:34:05 +0000
- Subject: [Bug fortran/63473] Memory leak with ALLOCATABLE, INTENT(OUT) dummy arguments.
- Auto-submitted: auto-generated
- References: <bug-63473-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63473
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.9/5 Regression] Memory |Memory leak with
|leak with ALLOCATABLE, |ALLOCATABLE, INTENT(OUT)
|INTENT(OUT) dummy |dummy arguments.
|arguments. |
--- Comment #5 from janus at gcc dot gnu.org ---
-fdump-tree-original shows the following:
if (array.data != 0B)
{
__builtin_free ((void *) array.data);
}
array.data = 0B;
allocate_mytype (&array);
So: Before the call to 'allocate_mytype', the array itself is being
auto-deallocated, but its components are not!