User account creation filtered due to spam.

Bug 41953 - missing uninitialized warning (SRA,VOP)
Summary: missing uninitialized warning (SRA,VOP)
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.5.0
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
Keywords: diagnostic
Depends on:
Blocks: Wuninitialized
  Show dependency treegraph
Reported: 2009-11-05 18:23 UTC by davidxl
Modified: 2009-11-19 12:24 UTC (History)
3 users (show)

See Also:
Known to work:
Known to fail:
Last reconfirmed: 2009-11-06 10:02:19


Note You need to log in before you can comment on or make changes to this bug.
Description davidxl 2009-11-05 18:23:23 UTC
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_;
Comment 1 Andrew Pinski 2009-11-05 23:39:47 UTC
Well in 4.5, there is only MEM for VOPs so I think this comes down to walking the VOP def trees and such.
Comment 2 Richard Biener 2009-11-06 10:02:19 UTC
Yes, the original implementation for uninitialized memory use was very
limited.  Now it's even more limited.