This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/53521] [4.5/4.6/4.7/4.8 Regression] Zero-byte "memory leak" with zero-sized array constructor (valgrind warning)
- From: "Joost.VandeVondele at mat dot ethz.ch" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 30 May 2012 14:37:09 +0000
- Subject: [Bug fortran/53521] [4.5/4.6/4.7/4.8 Regression] Zero-byte "memory leak" with zero-sized array constructor (valgrind warning)
- Auto-submitted: auto-generated
- References: <bug-53521-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53521
--- Comment #6 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> 2012-05-30 14:37:09 UTC ---
(In reply to comment #4)
> You say not doing free (0) leaks memory? What OS is this on?
I'm observing on a Linux box that :
MODULE TEST
IMPLICIT NONE
CONTAINS
SUBROUTINE T(n1)
INTEGER :: n1(:)
END SUBROUTINE T
SUBROUTINE T2(n)
INTEGER :: n
INTEGER :: k
CALL T((/(k,k=1,n-1)/))
END SUBROUTINE
END MODULE
USE TEST
DO
CALL T2(1)
ENDDO
END
needs 25Gb of memory after a while (notice the endless loop around CALL T2).