[Bug c++/59500] Bogus maybe-uninitialized (|| converted to nested-if)
manu at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Sep 12 21:03:00 GMT 2014
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)".
More information about the Gcc-bugs
mailing list