[Bug tree-optimization/80147] missing maybe-uninitialized warning on variable with no side effects

manu at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Nov 8 00:52:00 GMT 2017


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |manu at gcc dot gnu.org
         Resolution|---                         |INVALID

--- Comment #2 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Eric Gallager from comment #1)
> ...but if that's the case, then why doesn't the warning go away for i1, too?

Because "is-used" is given before optimization, while may-be-used are given
after optimization. I don't think this is a bug, but expected behaviour given
that optimization should allow more precise warnings (hence, discarding a false
positive). It would be nice if we could avoid warning about f1(i1), but that is
hard with the current Wuninitialized implementation (and a different already
reported bug).


More information about the Gcc-bugs mailing list