I just had a look at the source code of gcc version 4.5 snapshot 20091126
and I notice the following problem

~/gcc/20091126/src/gcc-4.5-20091126/gcc> fgrep note_count ipa-prop.c
  int note_count;
    note_count++;
  lto_output_uleb128_stream (ob->main_stream, note_count);

Please note that

* line 1 of the fgrep output is an *un* initialised declaration of local
variable note_count.
* line 2 increments it
* line 3 uses it.

At the shallow level, the code is broken and local variable note_count
needs initialisation, but at a deeper level this problem got through
the -Werror mechanism of bootstrap.

For the shallow level problem, maybe initialisation to zero would
be sufficient. For the deeper level problem, I cannot help.


-- 
           Summary: ipa-prop.c: use of uninitialised local data
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dcb314 at hotmail dot com
  GCC host triplet: suse-linux-x86_64


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42206

Reply via email to