https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108957
Bug ID: 108957
Summary: Fortran FE memleak with interfaces
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: anlauf at gcc dot gnu.org
Target Milestone: ---
The frontend leaks memory for the following sample:
module m
interface
subroutine s ()
end
end interface
end
==7949== 3,176 (2,792 direct, 384 indirect) bytes in 1 blocks are definitely
lost in loss record 160 of 174
==7949== at 0x4C39571: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==7949== by 0x2E5B904: xcalloc (xmalloc.c:164)
==7949== by 0xC6C174: gfc_get_namespace(gfc_namespace*, int)
(symbol.cc:2875)
==7949== by 0xC12CB0: parse_interface (parse.cc:3789)
==7949== by 0xC12CB0: parse_spec(gfc_statement) (parse.cc:4150)
==7949== by 0xC173D8: parse_module() (parse.cc:6531)
==7949== by 0xC17851: gfc_parse_file() (parse.cc:6842)
==7949== by 0xC76E02: gfc_be_parse_file() (f95-lang.cc:229)
==7949== by 0x14F78AB: compile_file() (toplev.cc:444)
==7949== by 0x14FA80B: do_compile(bool) (toplev.cc:2125)
==7949== by 0x14FABD4: toplev::main(int, char**) (toplev.cc:2277)
==7949== by 0x2D9DE05: main (main.cc:39)