This is seen using svn 137327 on Ubuntu Feisty. I believe 0 is the correct result.
[EMAIL PROTECTED] tmp35]$ current-gcc -O0 -fwrapv small.c -o small [EMAIL PROTECTED] tmp35]$ ./small 0 [EMAIL PROTECTED] tmp35]$ current-gcc -O1 -fwrapv small.c -o small [EMAIL PROTECTED] tmp35]$ ./small 255 [EMAIL PROTECTED] tmp35]$ current-gcc -v Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../configure --program-prefix=current- --enable-languages=c,c++ --prefix=/home/regehr Thread model: posix gcc version 4.4.0 20080701 (experimental) (GCC) [EMAIL PROTECTED] tmp35]$ cat small.c #include <stdio.h> unsigned char g_5; void func_1 (void); void func_1 (void) { for (g_5 = -7; g_5 >= 4; g_5 -= 5); } int main (void) { func_1 (); printf ("%d\n", g_5); return 0; } -- Summary: wrong value left in induction variable Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: regehr at cs dot utah dot edu GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36691