[Bug middle-end/14288] New: warning: 'SR.29591' may be used uninitialized in this function

gerald at pfeifer dot com gcc-bugzilla@gcc.gnu.org
Wed Feb 25 08:32:00 GMT 2004


Take the testcase generate-3.4.ii from PR8361 and compile with -c -W -O2:

generate.C: In member function `bool
MODEL_GENERATOR::possibleInferenceFromWeakConstraint(const GWEAKCONSTRAINT&,
const COST&) const':
generate.C:2964: warning: 'SR.29591' may be used uninitialized in this function
generate.C:2965: warning: 'SR.29593' may be used uninitialized in this function
generate.C: In member function `bool
MODEL_GENERATOR::PropagatePositiveFromUndefined(const GATOM&, GINTERPRET&)':
generate.C:2965: warning: 'SR.48780' may be used uninitialized in this function
generate.C:2964: warning: 'SR.48778' may be used uninitialized in this function
generate.C: In member function `bool MODEL_GENERATOR::PropagateMustBeTrue(const
GATOM&, GINTERPRET&)':
generate.C:2965: warning: 'SR.49389' may be used uninitialized in this function
generate.C:2964: warning: 'SR.49387' may be used uninitialized in this function
generate.C: In member function `bool MODEL_GENERATOR::PropagateNegative(const
GLITERAL&, GINTERPRET&)':
generate.C:2965: warning: 'SR.49989' may be used uninitialized in this function
generate.C:2964: warning: 'SR.49987' may be used uninitialized in this function
generate.C: In member function `bool MODEL_GENERATOR::Propagate(GINTERPRET&)':
generate.C:2965: warning: 'SR.50358' may be used uninitialized in this function
generate.C:2964: warning: 'SR.50356' may be used uninitialized in this function
generate.C: In member function `bool
MODEL_GENERATOR::ComputeWellFounded(GINTERPRET&)':
generate.C:2965: warning: 'SR.51068' may be used uninitialized in this function
generate.C:2964: warning: 'SR.51066' may be used uninitialized in this function

Clearly, we should never warn about variables which even don't appear in the
users's source like SR.50358.

-- 
           Summary: warning: 'SR.29591' may be used uninitialized in this
                    function
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gerald at pfeifer dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i386-pc-linux-gnu
  GCC host triplet: i386-pc-linux-gnu
GCC target triplet: i386-pc-linux-gnu


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



More information about the Gcc-bugs mailing list