[Bug middle-end/41953] New: False negative -- uninit warning

xinliangli at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Nov 5 18:23:00 GMT 2009


Compiling the following program with gcc 4.4, correct warning is emitted, but
not 4.5. This is related to PR41952.

(Option -fno-tree-sra is needed to trigger the problem).

struct ExtentsBase {
  int startx_;
  int endx_;
};

int f(const ExtentsBase &e1, int n) {
 ExtentsBase my_extents;
 if (n)
   my_extents.startx_ = e1.startx_;           // Warning missing from 4.5
 return my_extents.startx_;
}


-- 
           Summary: False negative -- uninit warning
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: xinliangli at gmail dot com


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



More information about the Gcc-bugs mailing list