This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/61378] New: Obvious bug in vn_reference_lookup_3


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]