------- 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