[Bug fortran/38319] Memory leaks in allocatable component expressions
janus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Jan 3 10:19:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38319
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |janus at gcc dot gnu.org
--- Comment #7 from janus at gcc dot gnu.org ---
I think it is indeed expected for valgrind to report leaks for the code in
comment 5, since variables in the main program are not supposed to be
auto-deallocated in F08.
Valgrind does not show any leaks if I put x into a subroutine:
type :: thytype
integer(4), allocatable :: h(:)
end type thytype
type :: mytype
type(thytype), allocatable :: q(:)
end type mytype
contains
subroutine s
type (mytype) :: x
x = mytype ([thytype([555])])
end subroutine
end
One should check the test cases listed in comment 0, in order to see if they
still show leaks and if those are actual bugs.
More information about the Gcc-bugs
mailing list