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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|c++                         |tree-optimization
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-02-04

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed. Though I am not 100% sure how to get this fixed. The warning is 100%
bogus as the basic block where it is being warned about can never be reached.



  if (cleanup.5_20 != 0)
    goto <bb 16>; [INV]
  else
    goto <bb 20>; [INV]

  <bb 16> :
  if (_51(D) != 0B)
    goto <bb 17>; [INV]
  else
    goto <bb 20>; [INV]

Only path which is bb 16 is reached is when cleanup.5_20 is non-zero and
cleanup.5_20 is defined as:
  cleanup.5_20 = 0;

So in theory the uninitialize warning pass should have detected that and not
warned.

Reply via email to