------- Comment #2 from rguenth at gcc dot gnu dot org 2009-04-02 09:43 ------- Confirmed. store motion transforms a loop
for (;;) a[0] = 1; to lsmtmp = a[0]; for (;;) lsmtmp = 1; a[0] = lsmtmp; introducing a load from uninitialized memory. We don't seem to DCE/DSE this for the tree element array but only the two element one. The fix is to avoid the load part of load-store-motion of course. The warning about unused aggregates is new in 4.4 which makes this a regression. On the a-i branch we remove the stores later. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rguenth at gcc dot gnu dot | |org, rakdver at gcc dot gnu | |dot org Status|UNCONFIRMED |NEW Component|c |tree-optimization Ever Confirmed|0 |1 Keywords| |missed-optimization Last reconfirmed|0000-00-00 00:00:00 |2009-04-02 09:43:52 date| | Summary|Incorrect warning issued Re |[4.4/4.5 Regression] |variable *is* used |Incorrect warning issued Re |uninitialized in this |variable *is* used |function |uninitialized in this | |function Target Milestone|--- |4.4.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39612