From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16800 invoked by alias); 31 May 2014 13:16:41 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 16738 invoked by uid 48); 31 May 2014 13:16:36 -0000 From: "dcb314 at hotmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/61378] New: Obvious bug in vn_reference_lookup_3 Date: Sat, 31 May 2014 13:16:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dcb314 at hotmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-05/txt/msg02605.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61378 Bug ID: 61378 Summary: Obvious bug in vn_reference_lookup_3 Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: dcb314 at hotmail dot com Valgrind says ==15936== Conditional jump or move depends on uninitialised value(s) ==15936== at 0xBE5839: vn_reference_lookup_3(ao_ref*, tree_node*, void*, bool) (tree-ssa-sccvn.c:1627) Source code is bool valueized_anything; for (unsigned i = 0; i < gimple_call_num_args (def_stmt); ++i) { oldargs[i] = gimple_call_arg (def_stmt, i); if (TREE_CODE (oldargs[i]) == SSA_NAME && VN_INFO (oldargs[i])->valnum != oldargs[i]) { gimple_call_set_arg (def_stmt, i, VN_INFO (oldargs[i])->valnum); valueized_anything = true; } } if (valueized_anything) Suggest init valueized_anything at its declaration. Use of svn blame shows 210160 rguenth if (valueized_anything)