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).