http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56488



Richard Biener <rguenth at gcc dot gnu.org> changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

           Keywords|                            |wrong-code

                 CC|                            |rguenth at gcc dot gnu.org



--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> 2013-03-01 
12:20:21 UTC ---

The fixing rev. doesn't make much sense ;)  The issue must be still latent.



> But e = e + 5 is avaluated as

> e = (short) ((int) e + 5)



not true before VRP2:



  short int e.2;

  short int e.4;



...



<bb 3>:

  # e.2_4 = PHI <e.4_18(3), 0(2)>

  f = b;

  D.1777_45 = e.2_4 + 5;

  e.4_18 = D.1777_45;

  e = e.4_18;

  if (e.4_18 != 1)

    goto <bb 3>;

  else

    goto <bb 4>;



which turns it into an endless loop.  The FE shortened to



  e = (short int) ((short unsigned int) e + 5);



but IVOPTs makes it short.  There was a related bugfix by Zdenek for 4.8.

Reply via email to