This is the mail archive of the gcc-bugs@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]

[Bug fortran/63473] Memory leak with ALLOCATABLE, INTENT(OUT) dummy arguments.


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!


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