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

Jeffrey A. Law <law at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2025-02-19
     Ever confirmed|0                           |1

--- Comment #3 from Jeffrey A. Law <law at gcc dot gnu.org> ---
So we're actually warning on this:


  MEM[(int *)0B + -4B] ={v} {CLOBBER(eob)};

This is the result of the zero-ing of various fields early:

<bb 2>
  MEM[(struct _Vector_impl_data *)&c2] ={v} {CLOBBER(bob)};
  MEM[(struct _Vector_impl_data *)&c2]._M_start = 0B;
  MEM[(struct _Vector_impl_data *)&c2]._M_finish = 0B;
  MEM[(struct _Vector_impl_data *)&c2]._M_end_of_storage = 0B;


Then later:
  _42 = c2.D.32138._M_impl.D.31450._M_finish;
  [ ... ]
  MEM[(int *)_42 + -4B] ={v} {CLOBBER(eob)};



The value gets propagated down and we naturally get the warning.  ISTM we
shouldn't be bothering with those checks on a gimple_clobber_p statement. 
Playing with that a bit right now.

Reply via email to