[PATCH] Fix PR27116, revert patch for PR23669
Richard Guenther
rguenther@suse.de
Wed Jun 7 15:52:00 GMT 2006
On Wed, 7 Jun 2006, Richard Guenther wrote:
>
> Reverting the (wrong) patch for PR23669 fixes the miscompilation in
> PR27116.
>
> Bootstrapped and tested (some time ago) on x86_64-unknown-linux-gnu.
>
> Ok for mainline?
Kindly noted by pinski, here's a testcase for dg-torture:
/* { dg-do run } */
extern void abort(void);
int f(int a, int b)
{
return (-1 - a) / (-b);
}
int main()
{
if (f(__INT_MAX__, 2) != __INT_MAX__/2 + 1)
abort ();
return 0;
}
Richard.
More information about the Gcc-patches
mailing list