------- Comment #5 from simonmar at microsoft dot com 2006-03-23 15:10 ------- I see your point, but I still think there's a bug. Let me change the code slightly:
#include <stdlib.h> #include <stdio.h> void f(int x) { long y; if (x < 0) { y = -x; if (y > 0) { printf("%d\n",y); } } } int main() { f(-0x80000000); exit(0); } $ gcc -O2 foo.c $ ./a.out -2147483648 so, we're in the y > 0 branch, but y is clearly < 0. -- simonmar at microsoft dot com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |UNCONFIRMED Component|middle-end |c Resolution|INVALID | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26824