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: "janus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Oct 2009 21:04:41 -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 #3 from janus at gcc dot gnu dot org 2009-10-16 21:04 -------
> AND ALSO FOR:
>
> type t0
> end type t0
> type(t0), allocatable :: m(:)
> allocate(t0 :: m(3))
> end
No, this one actually works (since 'm' is not a scalar):
if (m.data != 0B)
{
__builtin_free ((void *) m.data);
}
m.data = 0B;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41586