This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/41586] Allocatable _scalars_ are never auto-deallocated
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Oct 2009 15:17:23 -0000
- Subject: [Bug fortran/41586] Allocatable _scalars_ are never auto-deallocated
- References: <bug-41586-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from burnus at gcc dot gnu dot org 2009-10-05 15:17 -------
Does not need to be a component or derived type, any scalar leaks:
integer , allocatable :: a
allocate(a)
a = 42
end
MAIN__ ()
{
integer(kind=4) * a;
{
void * restrict D.1366;
D.1366 = (void * restrict) __builtin_malloc (4);
if (D.1366 == 0B)
{
_gfortran_os_error (&"Out of memory"[1]{lb: 1 sz: 1});
}
a = (integer(kind=4) *) D.1366;
}
*a = 42;
}
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[OOP] Allocatable _scalar_ |Allocatable _scalars_ are
|TYPE/CLASS leak memory |never auto-deallocated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41586