This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/80147] missing maybe-uninitialized warning on variable with no side effects
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 08 Nov 2017 00:52:14 +0000
- Subject: [Bug tree-optimization/80147] missing maybe-uninitialized warning on variable with no side effects
- Auto-submitted: auto-generated
- References: <bug-80147-4@http.gcc.gnu.org/bugzilla/>
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).