This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/69080] No automatic deallocation of allocatable function results
- From: "dominiq at lps dot ens.fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 29 Dec 2015 20:27:31 +0000
- Subject: [Bug fortran/69080] No automatic deallocation of allocatable function results
- Auto-submitted: auto-generated
- References: <bug-69080-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69080
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2015-12-29
Ever confirmed|0 |1
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
From 4.8 up to trunk (6.0), I see
==22973== 1 bytes in 1 blocks are definitely lost in loss record 1 of 65
==22973== at 0x100008EA1: malloc (vg_replace_malloc.c:303)
==22973== by 0x100000B34: __dummy_module_MOD_dummy_create_allocatable (in
./a.out)
==22973== by 0x100000AC5: __dummy_module_MOD_dummy_trigger (in ./a.out)
==22973== by 0x100000BFE: MAIN__ (in ./a.out)
==22973== by 0x100000CD0: main (in ./a.out)
> Is this correct behavior? If so, why?
I don't know, however you allocate result_object, but never deallocate it. I
have no idea about how and when this deallocation can be done.