[Bug middle-end/44608] unspecified signed overflow applied to unsigned int
rguenth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Jun 21 11:51:00 GMT 2010
------- Comment #6 from rguenth at gcc dot gnu dot org 2010-06-21 11:50 -------
int __attribute__((noinline))
abssat2 (int x)
{
unsigned int y = x;
if (x < 0)
y = -y;
if (y >= 0x80000000)
y--;
return y;
}
extern void abort (void);
int main()
{
if (abssat2 (0x80000000) != 0x7fffffff)
abort ();
return 0;
}
does not fail on x86_64 or i?86.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44608
More information about the Gcc-bugs
mailing list