On Thu, May 02, 2024 at 02:38:12PM -0600, Jeff Law wrote: > > > On 5/2/24 12:59 PM, Vineet Gupta wrote: > >This is no logic change (but technically still a functional change). > > > >Ran into this when stepping thru combine code. > >@newpat has some random garbage for a bit until it is actually set. > >With the fix it remains 0 until actually set. > > > >gcc/ChangeLog: > > * combine.cc (try_combine): Initialize newpat. > Isn't the same true even after this change if you turn on the optimizer? > And isn't the same true for many other objects that are initialized > lazily?
For all, even. Without this change the compiler can (in theory, anyway) diagnose the uninitialised use. After, there *is* no uninitialised use anymore. Please don't do this. It is not an improvement, it is several steps back, to satisfy a misguides sense of "security". Segher