http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56521
Bug #: 56521 Summary: [4.8 Regression] Uninitialized value_id Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: ja...@gcc.gnu.org CC: vr...@gcc.gnu.org Target: x86_64-linux valgrind --track-origins=yes --leak-check=full --db-attach=yes ./cc1 \ -fno-diagnostics-show-caret -O2 -w -o pr36666.s \ /usr/src/gcc/gcc/testsuite/gcc.c-torture/compile/pr36666.c shows: ==32184== Conditional jump or move depends on uninitialised value(s) ==32184== at 0xBCCF6D: add_to_value(unsigned int, pre_expr_d*) (tree-ssa-pre.c:577) ==32184== by 0xBD519A: compute_avail() (tree-ssa-pre.c:3846) ==32184== by 0xBD7C1A: do_pre() (tree-ssa-pre.c:4711) ==32184== by 0x977D9B: execute_one_pass(opt_pass*) (passes.c:2330) ==32184== by 0x977F8F: execute_pass_list(opt_pass*) (passes.c:2378) ==32184== by 0x977FC0: execute_pass_list(opt_pass*) (passes.c:2379) ==32184== by 0x6963B7: expand_function(cgraph_node*) (cgraphunit.c:1640) ==32184== by 0x696872: expand_all_functions() (cgraphunit.c:1744) ==32184== by 0x6972FC: compile() (cgraphunit.c:2042) ==32184== by 0x69747B: finalize_compilation_unit() (cgraphunit.c:2119) ==32184== by 0x5326B7: c_write_global_declarations() (c-decl.c:10118) ==32184== by 0xA68DEE: compile_file() (toplev.c:557) ==32184== Uninitialised value was created by a client request ==32184== at 0x6048D6: pool_alloc(alloc_pool_def*) (alloc-pool.c:327) ==32184== by 0xBF7201: visit_reference_op_call(tree_node*, gimple_statement_d*) (tree-ssa-sccvn.c:2738) ==32184== by 0xBF91FC: visit_use(tree_node*) (tree-ssa-sccvn.c:3503) ==32184== by 0xBF982E: process_scc(vec<tree_node*, va_heap, vl_ptr>) (tree-ssa-sccvn.c:3643) ==32184== by 0xBF9C64: extract_and_process_scc_for_name(tree_node*) (tree-ssa-sccvn.c:3727) ==32184== by 0xBF9E0F: DFS(tree_node*) (tree-ssa-sccvn.c:3781) ==32184== by 0xBFA8F5: run_scc_vn(vn_lookup_kind) (tree-ssa-sccvn.c:4027) ==32184== by 0xBD7BF5: do_pre() (tree-ssa-pre.c:4701) ==32184== by 0x977D9B: execute_one_pass(opt_pass*) (passes.c:2330) ==32184== by 0x977F8F: execute_pass_list(opt_pass*) (passes.c:2378) ==32184== by 0x977FC0: execute_pass_list(opt_pass*) (passes.c:2379) ==32184== by 0x6963B7: expand_function(cgraph_node*) (cgraphunit.c:1640) and plenty of other errors. visit_reference_op_call doesn't initialize value_id field, before http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189323 richi said value_id was supposed to be initialized later on through set_value_id_for_result but as lhs here is NULL or not SSA_NAME, that function doesn't do anything.