https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59500

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-09-12
             Blocks|                            |24639
            Summary|Bogus maybe-uninitialized   |Bogus maybe-uninitialized
                   |warning due to              |(|| converted to nested-if)
                   |optimizations               |
     Ever confirmed|0                           |1

--- Comment #5 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Andy Lutomirski from comment #1)
> This might be a duplicate of PR56574

I think not. In this case the problem is that

# value = PHI<value(D),intval()>
if (!valid || intval() < value)

is converted to

# value = PHI<value(D),intval() > 
if(!valid)
else if (intval() < value)

and I think the uninit pass is not smart enough to realize that the use is
guarded by valid != 0 but the default definition implies valid == 0.

Perhaps it is also a missed-optimization, since "if(cond())" could jump
directly to "if (intval() < value)".

Reply via email to