------- Comment #10 from hjl dot tools at gmail dot com 2010-06-21 20:57 ------- Revision 161041 deosn't fix it on Linux/x86-64. I got
valgrind --tool=memcheck ./f951 /export/gnu/import/rrs/161041/src/gcc/testsuite/gfortran.dg/typebound_proc_15.f03 -quiet -dumpbase typebound_proc_15.f03 -mtune=generic -march=pentium4 -auxbase typebound_proc_15 -std=f2003 -version -o typebound_proc_15.s -fintrinsic-modules-path finclude -m32 Error: Fortran 2008: PROCEDURE list at (1) ==7012== Invalid read of size 8 ==7012== at 0x4A5935: add_proc_component (class.c:223) ==7012== by 0x4A5A97: add_proc_comps (class.c:251) ==7012== by 0x4A5CFD: add_procs_to_declared_vtab1 (class.c:296) ==7012== by 0x4A615C: add_procs_to_declared_vtab (class.c:386) ==7012== by 0x4A6BAE: gfc_find_derived_vtab (class.c:626) ==7012== by 0x4A5711: gfc_build_class_symbol (class.c:177) ==7012== by 0x4ACB46: build_sym (decl.c:1163) ==7012== by 0x4ADF75: variable_decl (decl.c:1756) ==7012== by 0x4B106E: gfc_match_data_decl (decl.c:3857) ==7012== by 0x504FD3: match_word (parse.c:65) ==7012== by 0x5057F1: decode_statement (parse.c:284) ==7012== by 0x506F99: next_free (parse.c:723) ==7012== Address 0x7367d78 is 40 bytes inside a block of size 48 free'd ==7012== at 0x4C23D72: free (vg_replace_malloc.c:325) ==7012== by 0x4F7039: gfc_free (misc.c:51) ==7012== by 0x542D64: gfc_delete_symtree (symbol.c:2376) ==7012== by 0x54396E: gfc_undo_symbols (symbol.c:2843) ==7012== by 0x507F35: reject_statement (parse.c:1647) ==7012== by 0x504FFA: match_word (parse.c:70) ==7012== by 0x506321: decode_statement (parse.c:423) ==7012== by 0x506F99: next_free (parse.c:723) ==7012== by 0x507369: next_statement (parse.c:908) ==7012== by 0x508311: parse_derived_contains (parse.c:1870) ==7012== by 0x50876C: parse_derived (parse.c:2075) ==7012== by 0x509329: parse_spec (parse.c:2531) ==7012== ==7012== Invalid read of size 1 ==7012== at 0x527852: resolve_fl_derived (resolve.c:10831) ==7012== by 0x529649: resolve_symbol (resolve.c:11445) ==7012== by 0x5445E5: traverse_ns (symbol.c:3313) ==7012== by 0x544614: traverse_ns (symbol.c:3316) ==7012== by 0x544653: gfc_traverse_ns (symbol.c:3329) ==7012== by 0x52C83F: resolve_types (resolve.c:12909) ==7012== by 0x52CC3E: gfc_resolve (resolve.c:13005) ==7012== by 0x50BBF1: gfc_parse_file (parse.c:4371) ==7012== by 0x54C51E: gfc_be_parse_file (f95-lang.c:236) ==7012== by 0xA1E78A: compile_file (toplev.c:1012) ==7012== by 0xA20A39: do_compile (toplev.c:2377) ==7012== by 0xA20B0F: toplev_main (toplev.c:2419) ==7012== Address 0x7367bac is 76 bytes inside a block of size 424 free'd ==7012== at 0x4C23D72: free (vg_replace_malloc.c:325) ==7012== by 0x4F7039: gfc_free (misc.c:51) ==7012== by 0x542FE0: gfc_free_symbol (symbol.c:2482) ==7012== by 0x5439C0: gfc_undo_symbols (symbol.c:2849) ==7012== by 0x507F35: reject_statement (parse.c:1647) ==7012== by 0x504FFA: match_word (parse.c:70) ==7012== by 0x506321: decode_statement (parse.c:423) ==7012== by 0x506F99: next_free (parse.c:723) ==7012== by 0x507369: next_statement (parse.c:908) ==7012== by 0x508311: parse_derived_contains (parse.c:1870) ==7012== by 0x50876C: parse_derived (parse.c:2075) ==7012== by 0x509329: parse_spec (parse.c:2531) ==7012== ==7012== Invalid read of size 1 ==7012== at 0x5278A0: resolve_fl_derived (resolve.c:10838) ==7012== by 0x529649: resolve_symbol (resolve.c:11445) ==7012== by 0x5445E5: traverse_ns (symbol.c:3313) ==7012== by 0x544614: traverse_ns (symbol.c:3316) ==7012== by 0x544653: gfc_traverse_ns (symbol.c:3329) ==7012== by 0x52C83F: resolve_types (resolve.c:12909) ==7012== by 0x52CC3E: gfc_resolve (resolve.c:13005) ==7012== by 0x50BBF1: gfc_parse_file (parse.c:4371) ==7012== by 0x54C51E: gfc_be_parse_file (f95-lang.c:236) ==7012== by 0xA1E78A: compile_file (toplev.c:1012) ==7012== by 0xA20A39: do_compile (toplev.c:2377) ==7012== by 0xA20B0F: toplev_main (toplev.c:2419) ==7012== Address 0x7367bb1 is 81 bytes inside a block of size 424 free'd ==7012== at 0x4C23D72: free (vg_replace_malloc.c:325) ==7012== by 0x4F7039: gfc_free (misc.c:51) ==7012== by 0x542FE0: gfc_free_symbol (symbol.c:2482) ==7012== by 0x5439C0: gfc_undo_symbols (symbol.c:2849) ==7012== by 0x507F35: reject_statement (parse.c:1647) ==7012== by 0x504FFA: match_word (parse.c:70) ==7012== by 0x506321: decode_statement (parse.c:423) ==7012== by 0x506F99: next_free (parse.c:723) ==7012== by 0x507369: next_statement (parse.c:908) ==7012== by 0x508311: parse_derived_contains (parse.c:1870) ==7012== by 0x50876C: parse_derived (parse.c:2075) ==7012== by 0x509329: parse_spec (parse.c:2531) ==7012== ==7012== Invalid read of size 1 ==7012== at 0x5278B3: resolve_fl_derived (resolve.c:10838) ==7012== by 0x529649: resolve_symbol (resolve.c:11445) ==7012== by 0x5445E5: traverse_ns (symbol.c:3313) ==7012== by 0x544614: traverse_ns (symbol.c:3316) ==7012== by 0x544653: gfc_traverse_ns (symbol.c:3329) ==7012== by 0x52C83F: resolve_types (resolve.c:12909) ==7012== by 0x52CC3E: gfc_resolve (resolve.c:13005) ==7012== by 0x50BBF1: gfc_parse_file (parse.c:4371) ==7012== by 0x54C51E: gfc_be_parse_file (f95-lang.c:236) ==7012== by 0xA1E78A: compile_file (toplev.c:1012) ==7012== by 0xA20A39: do_compile (toplev.c:2377) ==7012== by 0xA20B0F: toplev_main (toplev.c:2419) ==7012== Address 0x7367ba8 is 72 bytes inside a block of size 424 free'd ==7012== at 0x4C23D72: free (vg_replace_malloc.c:325) ==7012== by 0x4F7039: gfc_free (misc.c:51) ==7012== by 0x542FE0: gfc_free_symbol (symbol.c:2482) ==7012== by 0x5439C0: gfc_undo_symbols (symbol.c:2849) ==7012== by 0x507F35: reject_statement (parse.c:1647) ==7012== by 0x504FFA: match_word (parse.c:70) ==7012== by 0x506321: decode_statement (parse.c:423) ==7012== by 0x506F99: next_free (parse.c:723) ==7012== by 0x507369: next_statement (parse.c:908) ==7012== by 0x508311: parse_derived_contains (parse.c:1870) ==7012== by 0x50876C: parse_derived (parse.c:2075) ==7012== by 0x509329: parse_spec (parse.c:2531) ==7012== ==7012== ==7012== HEAP SUMMARY: ==7012== in use at exit: 374,389 bytes in 1,069 blocks ==7012== total heap usage: 2,389 allocs, 1,320 frees, 859,064 bytes allocated ==7012== ==7012== LEAK SUMMARY: ==7012== definitely lost: 5,640 bytes in 7 blocks ==7012== indirectly lost: 11,704 bytes in 56 blocks ==7012== possibly lost: 16,128 bytes in 4 blocks ==7012== still reachable: 340,917 bytes in 1,002 blocks ==7012== suppressed: 0 bytes in 0 blocks ==7012== Rerun with --leak-check=full to see details of leaked memory ==7012== ==7012== For counts of detected and suppressed errors, rerun with: -v ==7012== ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 6 from 6) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44584