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: "sv dot mueller at tu-braunschweig dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 30 Sep 2016 08:50:43 +0000
- Subject: [Bug fortran/69080] No automatic deallocation of allocatable function results
- Auto-submitted: auto-generated
- References: <bug-69080-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69080
--- Comment #16 from Mueller <sv.mueller@tu-braunschweig.de> ---
I stumbled upon this problem when creating an object-oriented string class if I
remember correctly. Some procedure would allocate a string and return it (like
dummy_create_allocatable in the test prog). The calling procedure would use
that string in some way (like dummy_trigger is doing) and then doesn't need the
string anymore. So there was a use case for this: We wanted to have a nice
string class. This, sadly, is not feasable now as returned string objects would
just end in nirvana and not be deallocated if I gathered everything correctly.