Hello, from time to time, I come upon a testcase that failed during the automated runs, but passes during reduction; there are valgrind warnings present, however. How do I distinguish what warnings are valid and which are false positives? Is there any way gcc could prevent generating the false positives?
The compiler is configured as: $ x86_64-pc-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r12-5505-20211124090307-g5 deacf6058d-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x 86_64-pc-linux-gnu/12.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++ -- enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra --disable-bootstrap --with-cloog --with-ppl --with-isl --build=x86_64-pc- linux-gnu --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --with-ld= /usr/bin/x86_64-pc-linux-gnu-ld --with-as=/usr/bin/x86_64-pc-linux-gnu-as -- disable-libstdcxx-pch --prefix=/repo/gcc-trunk//binary-trunk-r12-5505- 20211124090307-g5deacf6058d-checking-yes-rtl-df-extra-nobootstrap-amd64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 12.0.0 20211124 (experimental) (GCC) The output is: $ x86_64-pc-linux-gnu-gcc `cat flags` -c -w mcf.ii -wrapper valgrind,-q,-- track-origins=yes ==5404== Invalid read of size 4 ==5404== at 0x197B210: put (hash-map.h:179) ==5404== by 0x197B210: void copy_warning<tree_node*, tree_node const*> (tree_node*, tree_node const*) (warning-control.cc:209) ==5404== by 0xE40CB6: cp_fold(tree_node*) (cp-gimplify.c:2837) ==5404== by 0xE413A9: cp_fold(tree_node*) (cp-gimplify.c:2679) ==5404== by 0xE42BAC: cp_fold_maybe_rvalue(tree_node*, bool) (cp- gimplify.c:2186) ==5404== by 0xE408C5: cp_fold(tree_node*) (cp-gimplify.c:2501) ==5404== by 0xE42BAC: cp_fold_maybe_rvalue(tree_node*, bool) (cp- gimplify.c:2186) ==5404== by 0xE410DD: cp_fold_rvalue (cp-gimplify.c:2209) ==5404== by 0xE410DD: cp_fold(tree_node*) (cp-gimplify.c:2568) ==5404== by 0xE42BAC: cp_fold_maybe_rvalue(tree_node*, bool) (cp- gimplify.c:2186) ==5404== by 0xEA8B34: fold_for_warn(tree_node*) (expr.c:418) ==5404== by 0x103F890: maybe_warn_about_returning_address_of_local (typeck.c:9994) ==5404== by 0x103F890: check_return_expr(tree_node*, bool*) (typeck.c: 10657) ==5404== by 0xFEC75F: finish_return_stmt(tree_node*) (semantics.c:1193) ==5404== by 0xF4DCEE: cp_parser_jump_statement (parser.c:14198) ==5404== by 0xF4DCEE: cp_parser_statement(cp_parser*, tree_node*, bool, bool*, vec<tree_node*, va_heap, vl_ptr>*, unsigned int*) (parser.c:12200) ==5404== Address 0x572ca94 is in a rw- anonymous segment ==5404== ==5404== Invalid read of size 4 ==5404== at 0x197B210: put (hash-map.h:179) ==5404== by 0x197B210: void copy_warning<tree_node*, tree_node const*> (tree_node*, tree_node const*) (warning-control.cc:209) ==5404== by 0x12B2343: fold_truth_not_expr(unsigned int, tree_node*) (fold-const.c:4288) ==5404== by 0x12A4B51: fold_unary_loc(unsigned int, tree_code, tree_ node*, tree_node*) (fold-const.c:9560) ==5404== by 0x12B2F6E: fold_build1_loc (fold-const.c:13728) ==5404== by 0x12B2F6E: invert_truthvalue_loc (fold-const.c:4425) ==5404== by 0x12B2F6E: invert_truthvalue_loc(unsigned int, tree_node*) (fold-const.c:4419) ==5404== by 0x1032CC2: cp_build_unary_op(tree_code, tree_node*, bool, int) (typeck.c:7007) ==5404== by 0xDE05F2: build_new_op(op_location_t const&, tree_code, int, tree_node*, tree_node*, tree_node*, tree_node**, int) (call.c:6912) ==5404== by 0x10314C6: build_x_unary_op(unsigned int, tree_code, cp_expr, int) (typeck.c:6433) ==5404== by 0xFF09D1: finish_unary_op_expr(unsigned int, tree_code, cp_ expr, int) (semantics.c:3044) ==5404== by 0xF6AB9B: cp_parser_unary_expression(cp_parser*, cp_id_kind*, bool, bool, bool) (parser.c:8900) ==5404== by 0xF3B14A: cp_parser_binary_expression(cp_parser*, bool, bool, bool, cp_parser_prec, cp_id_kind*) (parser.c:9925) ==5404== by 0xF3BA7C: cp_parser_assignment_expression(cp_parser*, cp_id_ kind*, bool, bool) (parser.c:10229) ==5404== by 0xF3D592: cp_parser_expression(cp_parser*, cp_id_kind*, bool, bool, bool) (parser.c:10399) ==5404== Address 0x5857ee4 is in a rw- anonymous segment ==5404== ==5404== Conditional jump or move depends on uninitialised value(s) ==5404== at 0x25DAAD7: incorporate_penalties (ipa-cp.c:3282) ==5404== by 0x25DAAD7: good_cloning_opportunity_p(cgraph_node*, sreal, sreal, profile_count, int) (ipa-cp.c:3340) ==5404== by 0x25DBA04: estimate_local_effects(cgraph_node*) (ipa-cp.c: 3560) ==5404== by 0x25E5DD3: propagate_constants_topo (ipa-cp.c:3871) ==5404== by 0x25E5DD3: ipcp_propagate_stage (ipa-cp.c:4058) ==5404== by 0x25E5DD3: ipcp_driver (ipa-cp.c:6541) ==5404== by 0x25E5DD3: (anonymous namespace)::pass_ipa_cp::execute (function*) (ipa-cp.c:6618) ==5404== by 0x1538C3C: execute_one_pass(opt_pass*) (passes.c:2567) ==5404== by 0x1539F66: execute_ipa_pass_list(opt_pass*) (passes.c:2996) ==5404== by 0x116DA88: ipa_passes (cgraphunit.c:2218) ==5404== by 0x116DA88: symbol_table::compile() [clone .part.0] (cgraphunit.c:2295) ==5404== by 0x1170577: compile (cgraphunit.c:2275) ==5404== by 0x1170577: symbol_table::finalize_compilation_unit() (cgraphunit.c:2543) ==5404== by 0x163A09F: compile_file() (toplev.c:479) ==5404== by 0xDC178D: do_compile (toplev.c:2156) ==5404== by 0xDC178D: toplev::main(int, char**) (toplev.c:2308) ==5404== by 0xDC36CE: main (main.c:39) ==5404== Uninitialised value was created by a client request ==5404== at 0x10DBC2A: ggc_internal_alloc(unsigned long, void (*)(void*), unsigned long, unsigned long) (ggc-page.c:1411) ==5404== by 0x13F1192: ggc_internal_alloc (ggc.h:130) ==5404== by 0x13F1192: allocate_new (symbol-summary.h:108) ==5404== by 0x13F1192: allocate_new (symbol-summary.h:104) ==5404== by 0x13F1192: get_create (symbol-summary.h:204) ==5404== by 0x13F1192: ipa_analyze_node(cgraph_node*) (ipa-prop.c:3041) ==5404== by 0x25D20A7: ipcp_generate_summary() (ipa-cp.c:6574) ==5404== by 0x1538732: execute_ipa_summary_passes(ipa_opt_pass_d*) (passes.c:2248) ==5404== by 0x116DD47: ipa_passes (cgraphunit.c:2185) ==5404== by 0x116DD47: symbol_table::compile() [clone .part.0] (cgraphunit.c:2295) ==5404== by 0x1170577: compile (cgraphunit.c:2275) ==5404== by 0x1170577: symbol_table::finalize_compilation_unit() (cgraphunit.c:2543) ==5404== by 0x163A09F: compile_file() (toplev.c:479) ==5404== by 0xDC178D: do_compile (toplev.c:2156) ==5404== by 0xDC178D: toplev::main(int, char**) (toplev.c:2308) ==5404== by 0xDC36CE: main (main.c:39) ==5404== ==5404== Conditional jump or move depends on uninitialised value(s) ==5404== at 0x25DAAD7: incorporate_penalties (ipa-cp.c:3282) ==5404== by 0x25DAAD7: good_cloning_opportunity_p(cgraph_node*, sreal, sreal, profile_count, int) (ipa-cp.c:3340) ==5404== by 0x25E03E8: bool decide_about_value<tree_node*>(cgraph_node*, int, long, ipcp_value<tree_node*>*, ipa_auto_call_arg_values*, vec<cgraph_ node*, va_heap, vl_ptr>*) (ipa-cp.c:6080) ==5404== by 0x25E2244: decide_whether_version_node(cgraph_node*) (ipa-cp. c:6158) ==5404== by 0x25E4515: ipcp_decision_stage (ipa-cp.c:6355) ==5404== by 0x25E4515: ipcp_driver (ipa-cp.c:6543) ==5404== by 0x25E4515: (anonymous namespace)::pass_ipa_cp::execute (function*) (ipa-cp.c:6618) ==5404== by 0x1538C3C: execute_one_pass(opt_pass*) (passes.c:2567) ==5404== by 0x1539F66: execute_ipa_pass_list(opt_pass*) (passes.c:2996) ==5404== by 0x116DA88: ipa_passes (cgraphunit.c:2218) ==5404== by 0x116DA88: symbol_table::compile() [clone .part.0] (cgraphunit.c:2295) ==5404== by 0x1170577: compile (cgraphunit.c:2275) ==5404== by 0x1170577: symbol_table::finalize_compilation_unit() (cgraphunit.c:2543) ==5404== by 0x163A09F: compile_file() (toplev.c:479) ==5404== by 0xDC178D: do_compile (toplev.c:2156) ==5404== by 0xDC178D: toplev::main(int, char**) (toplev.c:2308) ==5404== by 0xDC36CE: main (main.c:39) ==5404== Uninitialised value was created by a client request ==5404== at 0x10DBC2A: ggc_internal_alloc(unsigned long, void (*)(void*), unsigned long, unsigned long) (ggc-page.c:1411) ==5404== by 0x13F1192: ggc_internal_alloc (ggc.h:130) ==5404== by 0x13F1192: allocate_new (symbol-summary.h:108) ==5404== by 0x13F1192: allocate_new (symbol-summary.h:104) ==5404== by 0x13F1192: get_create (symbol-summary.h:204) ==5404== by 0x13F1192: ipa_analyze_node(cgraph_node*) (ipa-prop.c:3041) ==5404== by 0x25D20A7: ipcp_generate_summary() (ipa-cp.c:6574) ==5404== by 0x1538732: execute_ipa_summary_passes(ipa_opt_pass_d*) (passes.c:2248) ==5404== by 0x116DD47: ipa_passes (cgraphunit.c:2185) ==5404== by 0x116DD47: symbol_table::compile() [clone .part.0] (cgraphunit.c:2295) ==5404== by 0x1170577: compile (cgraphunit.c:2275) ==5404== by 0x1170577: symbol_table::finalize_compilation_unit() (cgraphunit.c:2543) ==5404== by 0x163A09F: compile_file() (toplev.c:479) ==5404== by 0xDC178D: do_compile (toplev.c:2156) ==5404== by 0xDC178D: toplev::main(int, char**) (toplev.c:2308) ==5404== by 0xDC36CE: main (main.c:39) ==5404== ==5404== Conditional jump or move depends on uninitialised value(s) ==5404== at 0x25DAAD7: incorporate_penalties (ipa-cp.c:3282) ==5404== by 0x25DAAD7: good_cloning_opportunity_p(cgraph_node*, sreal, sreal, profile_count, int) (ipa-cp.c:3340) ==5404== by 0x25E084C: bool decide_about_value<tree_node*>(cgraph_node*, int, long, ipcp_value<tree_node*>*, ipa_auto_call_arg_values*, vec<cgraph_ node*, va_heap, vl_ptr>*) (ipa-cp.c:6083) ==5404== by 0x25E2244: decide_whether_version_node(cgraph_node*) (ipa-cp. c:6158) ==5404== by 0x25E4515: ipcp_decision_stage (ipa-cp.c:6355) ==5404== by 0x25E4515: ipcp_driver (ipa-cp.c:6543) ==5404== by 0x25E4515: (anonymous namespace)::pass_ipa_cp::execute (function*) (ipa-cp.c:6618) ==5404== by 0x1538C3C: execute_one_pass(opt_pass*) (passes.c:2567) ==5404== by 0x1539F66: execute_ipa_pass_list(opt_pass*) (passes.c:2996) ==5404== by 0x116DA88: ipa_passes (cgraphunit.c:2218) ==5404== by 0x116DA88: symbol_table::compile() [clone .part.0] (cgraphunit.c:2295) ==5404== by 0x1170577: compile (cgraphunit.c:2275) ==5404== by 0x1170577: symbol_table::finalize_compilation_unit() (cgraphunit.c:2543) ==5404== by 0x163A09F: compile_file() (toplev.c:479) ==5404== by 0xDC178D: do_compile (toplev.c:2156) ==5404== by 0xDC178D: toplev::main(int, char**) (toplev.c:2308) ==5404== by 0xDC36CE: main (main.c:39) ==5404== Uninitialised value was created by a client request ==5404== at 0x10DBC2A: ggc_internal_alloc(unsigned long, void (*)(void*), unsigned long, unsigned long) (ggc-page.c:1411) ==5404== by 0x13F1192: ggc_internal_alloc (ggc.h:130) ==5404== by 0x13F1192: allocate_new (symbol-summary.h:108) ==5404== by 0x13F1192: allocate_new (symbol-summary.h:104) ==5404== by 0x13F1192: get_create (symbol-summary.h:204) ==5404== by 0x13F1192: ipa_analyze_node(cgraph_node*) (ipa-prop.c:3041) ==5404== by 0x25D20A7: ipcp_generate_summary() (ipa-cp.c:6574) ==5404== by 0x1538732: execute_ipa_summary_passes(ipa_opt_pass_d*) (passes.c:2248) ==5404== by 0x116DD47: ipa_passes (cgraphunit.c:2185) ==5404== by 0x116DD47: symbol_table::compile() [clone .part.0] (cgraphunit.c:2295) ==5404== by 0x1170577: compile (cgraphunit.c:2275) ==5404== by 0x1170577: symbol_table::finalize_compilation_unit() (cgraphunit.c:2543) ==5404== by 0x163A09F: compile_file() (toplev.c:479) ==5404== by 0xDC178D: do_compile (toplev.c:2156) ==5404== by 0xDC178D: toplev::main(int, char**) (toplev.c:2308) ==5404== by 0xDC36CE: main (main.c:39) ==5404== ==5404== Conditional jump or move depends on uninitialised value(s) ==5404== at 0x25DAAD7: incorporate_penalties (ipa-cp.c:3282) ==5404== by 0x25DAAD7: good_cloning_opportunity_p(cgraph_node*, sreal, sreal, profile_count, int) (ipa-cp.c:3340) ==5404== by 0x25E03E8: bool decide_about_value<tree_node*>(cgraph_node*, int, long, ipcp_value<tree_node*>*, ipa_auto_call_arg_values*, vec<cgraph_ node*, va_heap, vl_ptr>*) (ipa-cp.c:6080) ==5404== by 0x25E11B2: decide_whether_version_node(cgraph_node*) (ipa-cp. c:6173) ==5404== by 0x25E4515: ipcp_decision_stage (ipa-cp.c:6355) ==5404== by 0x25E4515: ipcp_driver (ipa-cp.c:6543) ==5404== by 0x25E4515: (anonymous namespace)::pass_ipa_cp::execute (function*) (ipa-cp.c:6618) ==5404== by 0x1538C3C: execute_one_pass(opt_pass*) (passes.c:2567) ==5404== by 0x1539F66: execute_ipa_pass_list(opt_pass*) (passes.c:2996) ==5404== by 0x116DA88: ipa_passes (cgraphunit.c:2218) ==5404== by 0x116DA88: symbol_table::compile() [clone .part.0] (cgraphunit.c:2295) ==5404== by 0x1170577: compile (cgraphunit.c:2275) ==5404== by 0x1170577: symbol_table::finalize_compilation_unit() (cgraphunit.c:2543) ==5404== by 0x163A09F: compile_file() (toplev.c:479) ==5404== by 0xDC178D: do_compile (toplev.c:2156) ==5404== by 0xDC178D: toplev::main(int, char**) (toplev.c:2308) ==5404== by 0xDC36CE: main (main.c:39) ==5404== Uninitialised value was created by a client request ==5404== at 0x10DBC2A: ggc_internal_alloc(unsigned long, void (*)(void*), unsigned long, unsigned long) (ggc-page.c:1411) ==5404== by 0x13F1192: ggc_internal_alloc (ggc.h:130) ==5404== by 0x13F1192: allocate_new (symbol-summary.h:108) ==5404== by 0x13F1192: allocate_new (symbol-summary.h:104) ==5404== by 0x13F1192: get_create (symbol-summary.h:204) ==5404== by 0x13F1192: ipa_analyze_node(cgraph_node*) (ipa-prop.c:3041) ==5404== by 0x25D20A7: ipcp_generate_summary() (ipa-cp.c:6574) ==5404== by 0x1538732: execute_ipa_summary_passes(ipa_opt_pass_d*) (passes.c:2248) ==5404== by 0x116DD47: ipa_passes (cgraphunit.c:2185) ==5404== by 0x116DD47: symbol_table::compile() [clone .part.0] (cgraphunit.c:2295) ==5404== by 0x1170577: compile (cgraphunit.c:2275) ==5404== by 0x1170577: symbol_table::finalize_compilation_unit() (cgraphunit.c:2543) ==5404== by 0x163A09F: compile_file() (toplev.c:479) ==5404== by 0xDC178D: do_compile (toplev.c:2156) ==5404== by 0xDC178D: toplev::main(int, char**) (toplev.c:2308) ==5404== by 0xDC36CE: main (main.c:39) ==5404== ==5404== Conditional jump or move depends on uninitialised value(s) ==5404== at 0x25DAAD7: incorporate_penalties (ipa-cp.c:3282) ==5404== by 0x25DAAD7: good_cloning_opportunity_p(cgraph_node*, sreal, sreal, profile_count, int) (ipa-cp.c:3340) ==5404== by 0x25E084C: bool decide_about_value<tree_node*>(cgraph_node*, int, long, ipcp_value<tree_node*>*, ipa_auto_call_arg_values*, vec<cgraph_ node*, va_heap, vl_ptr>*) (ipa-cp.c:6083) ==5404== by 0x25E11B2: decide_whether_version_node(cgraph_node*) (ipa-cp. c:6173) ==5404== by 0x25E4515: ipcp_decision_stage (ipa-cp.c:6355) ==5404== by 0x25E4515: ipcp_driver (ipa-cp.c:6543) ==5404== by 0x25E4515: (anonymous namespace)::pass_ipa_cp::execute (function*) (ipa-cp.c:6618) ==5404== by 0x1538C3C: execute_one_pass(opt_pass*) (passes.c:2567) ==5404== by 0x1539F66: execute_ipa_pass_list(opt_pass*) (passes.c:2996) ==5404== by 0x116DA88: ipa_passes (cgraphunit.c:2218) ==5404== by 0x116DA88: symbol_table::compile() [clone .part.0] (cgraphunit.c:2295) ==5404== by 0x1170577: compile (cgraphunit.c:2275) ==5404== by 0x1170577: symbol_table::finalize_compilation_unit() (cgraphunit.c:2543) ==5404== by 0x163A09F: compile_file() (toplev.c:479) ==5404== by 0xDC178D: do_compile (toplev.c:2156) ==5404== by 0xDC178D: toplev::main(int, char**) (toplev.c:2308) ==5404== by 0xDC36CE: main (main.c:39) ==5404== Uninitialised value was created by a client request ==5404== at 0x10DBC2A: ggc_internal_alloc(unsigned long, void (*)(void*), unsigned long, unsigned long) (ggc-page.c:1411) ==5404== by 0x13F1192: ggc_internal_alloc (ggc.h:130) ==5404== by 0x13F1192: allocate_new (symbol-summary.h:108) ==5404== by 0x13F1192: allocate_new (symbol-summary.h:104) ==5404== by 0x13F1192: get_create (symbol-summary.h:204) ==5404== by 0x13F1192: ipa_analyze_node(cgraph_node*) (ipa-prop.c:3041) ==5404== by 0x25D20A7: ipcp_generate_summary() (ipa-cp.c:6574) ==5404== by 0x1538732: execute_ipa_summary_passes(ipa_opt_pass_d*) (passes.c:2248) ==5404== by 0x116DD47: ipa_passes (cgraphunit.c:2185) ==5404== by 0x116DD47: symbol_table::compile() [clone .part.0] (cgraphunit.c:2295) ==5404== by 0x1170577: compile (cgraphunit.c:2275) ==5404== by 0x1170577: symbol_table::finalize_compilation_unit() (cgraphunit.c:2543) ==5404== by 0x163A09F: compile_file() (toplev.c:479) ==5404== by 0xDC178D: do_compile (toplev.c:2156) ==5404== by 0xDC178D: toplev::main(int, char**) (toplev.c:2308) ==5404== by 0xDC36CE: main (main.c:39) ==5404== ==5404== Invalid read of size 8 ==5404== at 0x13FEB4E: hash_map<tree_node*, tree_node*, simple_hashmap_ traits<default_hash_traits<tree_node*>, tree_node*> >::put(tree_node* const& , tree_node* const&) [clone .isra.0] (hash-map.h:176) ==5404== by 0x13FFDF6: ipa_param_body_adjustments::prepare_debug_ expressions(tree_node*) (ipa-param-manipulation.c:1250) ==5404== by 0x13FF61B: ipa_param_body_adjustments::prepare_debug_ expressions(tree_node*) (ipa-param-manipulation.c:1230) ==5404== by 0x1400917: ipa_param_body_adjustments::common_initialization (tree_node*, tree_node**, vec<ipa_replace_map*, va_gc, vl_embed>*) (ipa- param-manipulation.c:1428) ==5404== by 0x16C6A84: tree_function_versioning(tree_node*, tree_node*, vec<ipa_replace_map*, va_gc, vl_embed>*, ipa_param_adjustments*, bool, bitmap_head*, basic_block_def*) (tree-inline.c:6303) ==5404== by 0x117247D: cgraph_node::materialize_clone() (cgraphclones.c: 1142) ==5404== by 0x1160C05: cgraph_node::get_untransformed_body() (cgraph.c: 3965) ==5404== by 0x13BD59B: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:720) ==5404== by 0x13BD5CC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==5404== by 0x13BD5CC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==5404== by 0x13BD5CC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==5404== by 0x13BF49B: inline_transform(cgraph_node*) (ipa-inline- transform.c:777) ==5404== Address 0x8950ce8 is 152 bytes inside a block of size 208 free'd ==5404== at 0x484240F: free (in /usr/libexec/valgrind/vgpreload_memcheck- amd64-linux.so) ==5404== by 0x13FEB88: find_slot_with_hash (hash-table.h:967) ==5404== by 0x13FEB88: hash_map<tree_node*, tree_node*, simple_hashmap_ traits<default_hash_traits<tree_node*>, tree_node*> >::put(tree_node* const& , tree_node* const&) [clone .isra.0] (hash-map.h:170) ==5404== by 0x13FFDF6: ipa_param_body_adjustments::prepare_debug_ expressions(tree_node*) (ipa-param-manipulation.c:1250) ==5404== by 0x13FF61B: ipa_param_body_adjustments::prepare_debug_ expressions(tree_node*) (ipa-param-manipulation.c:1230) ==5404== by 0x1400917: ipa_param_body_adjustments::common_initialization (tree_node*, tree_node**, vec<ipa_replace_map*, va_gc, vl_embed>*) (ipa- param-manipulation.c:1428) ==5404== by 0x16C6A84: tree_function_versioning(tree_node*, tree_node*, vec<ipa_replace_map*, va_gc, vl_embed>*, ipa_param_adjustments*, bool, bitmap_head*, basic_block_def*) (tree-inline.c:6303) ==5404== by 0x117247D: cgraph_node::materialize_clone() (cgraphclones.c: 1142) ==5404== by 0x1160C05: cgraph_node::get_untransformed_body() (cgraph.c: 3965) ==5404== by 0x13BD59B: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:720) ==5404== by 0x13BD5CC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==5404== by 0x13BD5CC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==5404== by 0x13BD5CC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==5404== Block was alloc'd at ==5404== at 0x4844C0F: calloc (in /usr/libexec/valgrind/vgpreload_ memcheck-amd64-linux.so) ==5404== by 0x2803FF4: xcalloc (xmalloc.c:164) ==5404== by 0x100D1A6: data_alloc (hash-table.h:275) ==5404== by 0x100D1A6: alloc_entries (hash-table.h:711) ==5404== by 0x100D1A6: hash_table<hash_map<tree_node*, tree_node*, simple _hashmap_traits<default_hash_traits<tree_node*>, tree_node*> >::hash_entry, false, xcallocator>::hash_table(unsigned long, bool, bool, bool, mem_alloc_ origin) (hash-table.h:628) ==5404== by 0x140169A: hash_map (hash-map.h:142) ==5404== by 0x140169A: ipa_param_body_adjustments::ipa_param_body_ adjustments(ipa_param_adjustments*, tree_node*, tree_node*, copy_body_data*, tree_node**, vec<ipa_replace_map*, va_gc, vl_embed>*) (ipa-param- manipulation.c:1483) ==5404== by 0x16C6A84: tree_function_versioning(tree_node*, tree_node*, vec<ipa_replace_map*, va_gc, vl_embed>*, ipa_param_adjustments*, bool, bitmap_head*, basic_block_def*) (tree-inline.c:6303) ==5404== by 0x117247D: cgraph_node::materialize_clone() (cgraphclones.c: 1142) ==5404== by 0x1160C05: cgraph_node::get_untransformed_body() (cgraph.c: 3965) ==5404== by 0x13BD59B: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:720) ==5404== by 0x13BD5CC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==5404== by 0x13BD5CC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==5404== by 0x13BD5CC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==5404== by 0x13BF49B: inline_transform(cgraph_node*) (ipa-inline- transform.c:777) ==5404== ==5404== Invalid read of size 8 ==5404== at 0x13FFDF7: ipa_param_body_adjustments::prepare_debug_ expressions(tree_node*) (ipa-param-manipulation.c:1251) ==5404== by 0x13FF61B: ipa_param_body_adjustments::prepare_debug_ expressions(tree_node*) (ipa-param-manipulation.c:1230) ==5404== by 0x1400917: ipa_param_body_adjustments::common_initialization (tree_node*, tree_node**, vec<ipa_replace_map*, va_gc, vl_embed>*) (ipa- param-manipulation.c:1428) ==5404== by 0x16C6A84: tree_function_versioning(tree_node*, tree_node*, vec<ipa_replace_map*, va_gc, vl_embed>*, ipa_param_adjustments*, bool, bitmap_head*, basic_block_def*) (tree-inline.c:6303) ==5404== by 0x117247D: cgraph_node::materialize_clone() (cgraphclones.c: 1142) ==5404== by 0x1160C05: cgraph_node::get_untransformed_body() (cgraph.c: 3965) ==5404== by 0x13BD59B: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:720) ==5404== by 0x13BD5CC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==5404== by 0x13BD5CC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==5404== by 0x13BD5CC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==5404== by 0x13BF49B: inline_transform(cgraph_node*) (ipa-inline- transform.c:777) ==5404== by 0x15388D5: execute_one_ipa_transform_pass (passes.c:2290) ==5404== by 0x15388D5: execute_all_ipa_transforms(bool) (passes.c:2337) ==5404== Address 0x8950ce8 is 152 bytes inside a block of size 208 free'd ==5404== at 0x484240F: free (in /usr/libexec/valgrind/vgpreload_memcheck- amd64-linux.so) ==5404== by 0x13FEB88: find_slot_with_hash (hash-table.h:967) ==5404== by 0x13FEB88: hash_map<tree_node*, tree_node*, simple_hashmap_ traits<default_hash_traits<tree_node*>, tree_node*> >::put(tree_node* const& , tree_node* const&) [clone .isra.0] (hash-map.h:170) ==5404== by 0x13FFDF6: ipa_param_body_adjustments::prepare_debug_ expressions(tree_node*) (ipa-param-manipulation.c:1250) ==5404== by 0x13FF61B: ipa_param_body_adjustments::prepare_debug_ expressions(tree_node*) (ipa-param-manipulation.c:1230) ==5404== by 0x1400917: ipa_param_body_adjustments::common_initialization (tree_node*, tree_node**, vec<ipa_replace_map*, va_gc, vl_embed>*) (ipa- param-manipulation.c:1428) ==5404== by 0x16C6A84: tree_function_versioning(tree_node*, tree_node*, vec<ipa_replace_map*, va_gc, vl_embed>*, ipa_param_adjustments*, bool, bitmap_head*, basic_block_def*) (tree-inline.c:6303) ==5404== by 0x117247D: cgraph_node::materialize_clone() (cgraphclones.c: 1142) ==5404== by 0x1160C05: cgraph_node::get_untransformed_body() (cgraph.c: 3965) ==5404== by 0x13BD59B: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:720) ==5404== by 0x13BD5CC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==5404== by 0x13BD5CC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==5404== by 0x13BD5CC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==5404== Block was alloc'd at ==5404== at 0x4844C0F: calloc (in /usr/libexec/valgrind/vgpreload_ memcheck-amd64-linux.so) ==5404== by 0x2803FF4: xcalloc (xmalloc.c:164) ==5404== by 0x100D1A6: data_alloc (hash-table.h:275) ==5404== by 0x100D1A6: alloc_entries (hash-table.h:711) ==5404== by 0x100D1A6: hash_table<hash_map<tree_node*, tree_node*, simple _hashmap_traits<default_hash_traits<tree_node*>, tree_node*> >::hash_entry, false, xcallocator>::hash_table(unsigned long, bool, bool, bool, mem_alloc_ origin) (hash-table.h:628) ==5404== by 0x140169A: hash_map (hash-map.h:142) ==5404== by 0x140169A: ipa_param_body_adjustments::ipa_param_body_ adjustments(ipa_param_adjustments*, tree_node*, tree_node*, copy_body_data*, tree_node**, vec<ipa_replace_map*, va_gc, vl_embed>*) (ipa-param- manipulation.c:1483) ==5404== by 0x16C6A84: tree_function_versioning(tree_node*, tree_node*, vec<ipa_replace_map*, va_gc, vl_embed>*, ipa_param_adjustments*, bool, bitmap_head*, basic_block_def*) (tree-inline.c:6303) ==5404== by 0x117247D: cgraph_node::materialize_clone() (cgraphclones.c: 1142) ==5404== by 0x1160C05: cgraph_node::get_untransformed_body() (cgraph.c: 3965) ==5404== by 0x13BD59B: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:720) ==5404== by 0x13BD5CC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==5404== by 0x13BD5CC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==5404== by 0x13BD5CC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==5404== by 0x13BF49B: inline_transform(cgraph_node*) (ipa-inline- transform.c:777) ==5404== Thanks, Zdenek