[Bug fortran/111952] Allocatable of derived type with DTIO is not deallocated going out of scope

jvdelisle at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Dec 4 04:34:31 GMT 2025


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111952

Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jvdelisle at gcc dot gnu.org

--- Comment #1 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
What is the expected behavior?

$ ./a.out 
At line 22 of file allocator.f90
Fortran runtime error: Attempting to allocate already allocated variable 'x'

Is it expected that the variable is deallocated upon exit from the subroutine?


More information about the Gcc-bugs mailing list