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

--- Comment #16 from H.J. Lu <hjl.tools at gmail dot com> 2010-11-28 16:10:08 
UTC ---
--
void
foo (int n)
{
  int npairs, i;
  npairs = n - (-__INT_MAX__ - 1);

  if (npairs > 0)
    for (i = 0; i < npairs; i++)
      j++;
}
--

is miscompiled.  But

--
void
foo (int n)
{
  int npairs, i;
  npairs = n - -2147483648;

  if (npairs > 0)
    for (i = 0; i < npairs; i++)
      j++;
}
--

isn't.

Reply via email to