------- Comment #6 from christoph dot mallon at gmx dot de 2007-02-19 14:25 ------- (In reply to comment #5) > (In reply to comment #4) > > I doubt this is a duplicate of Bug 22456 because the code there is dead. > > It looks more like Bug 30542 and Bug 30575 which both are mentioned in Bug > > 22456. These do not look like duplicates of Bug 22456 either because the > > code > > there is not dead. > > It's exactly the same as Bug 30542 and Bug 30575. I'd guess it is really a > duplicate of Bug 22456, and the "dead" code is indeed dead but not in the > sense > we think it is. A single comment from gcc developers would clarify it, > something like "We are indeed aware of this serious bug and #22456 is just an > umbreall bug which happened to have bogus test case" or "No, it's not a > serious > bug, and the code there and here is the same". Or something.
In Bug 22456 all calculated values are unused from the start, so it could be argued that it is not necessary to generate a warning. In this case (and Bug 30542 and Bug 30575) the values are _not_ unused and only a later optimisation phase, which reduces phis, which only have undefined and arbitrarily often one value as input to exactly this input, or a bit math speak: Phi(x_1, ..., x_n) --> X where x_1, ..., x_n are element of { UNDEFINED, X } So when finally the uninitialised variable warning is generated there is no more uninitialised variable. The warning should simply be generated _before_ this optimisation. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30856