http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57922
Bug ID: 57922 Summary: Memory leak with allocatable polymorphics Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: townsend at astro dot wisc.edu Created attachment 30520 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30520&action=edit Example program I'm experiencing a problem with: Using built-in specs. COLLECT_GCC=/Applications/madsdk/bin/gfortran.exec COLLECT_LTO_WRAPPER=/Applications/madsdk/libexec/gcc/x86_64-apple-darwin11.4.2/4.9.0/lto-wrapper Target: x86_64-apple-darwin11.4.2 Configured with: ./configure CC='gcc -D_FORTIFY_SOURCE=0' --build=x86_64-apple-darwin11.4.2 --prefix=/Applications/madsdk --with-gmp=/Applications/madsdk --with-mpfr=/Applications/madsdk --with-mpc=/Applications/madsdk --enable-languages=c,c++,fortran --disable-multilib Thread model: posix gcc version 4.9.0 20130404 (experimental) (GCC) The attached example program demonstrates the problem. When f is deallocated, it seems that f%x is not getting deallocated, causing the memory footprint of the program (as reported by the ps syscall) to grow without bound.