Using valgrind: valgrind -v --leak-check=full gfc -v
--snip-- ==4758== 30 bytes in 1 blocks are definitely lost in loss record 1 of 6 ==4758== at 0x1B909222: malloc (vg_replace_malloc.c:130) ==4758== by 0x805D708: make_relative_prefix (make-relative-prefix.c:361) ==4758== by 0x804D36C: process_command (gcc.c:3370) ==4758== by 0x805345B: main (gcc.c:6182) --snip-- -- Summary: Memory leak in make_relative_prefix Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jvdelisle at gcc dot gnu dot org GCC host triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27354