[Bug c++/69892] Missing -Wuninitialized warning

glisse at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Feb 21 16:54:00 GMT 2016


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...


More information about the Gcc-bugs mailing list