This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/69892] Missing -Wuninitialized warning
- From: "glisse at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 21 Feb 2016 16:54:13 +0000
- Subject: [Bug c++/69892] Missing -Wuninitialized warning
- Auto-submitted: auto-generated
- References: <bug-69892-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69892
--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> ---
<bb 2>:
# valid_1 = PHI <valid_2(D)(0), valid_3(3)>
if (valid_1 != 0)
goto <bb 3>;
else
goto <bb 4>;
<bb 3>:
valid_3 = 0;
goto <bb 2>;
CCP notices that valid_1 is either undefined or 0 and simplifies it to 0. There
are several PRs where CCP prevents an uninitialized warning, I don't remember
if there is a meta-bug for those.
On the other hand, pass_early_warn_uninitialized is before that, and should
have warned, not sure why it failed...