------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-12 
07:04 -------
(In reply to comment #1)
> 4.0 produced:
>   D.1463 = n - -1073741824;
>   if (D.1463 >= 0)
> 
> Which is wrong as overflow is undefined.

This shows that fold is doing something wrong:
void abort(void);

int f(int n)
{
  if (n< 0)
   return 1;
  n+=1073741824;
  return n >= 0;
}
int main()
{
 if (f(1073741824))
   abort ();
}

-- 


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

Reply via email to