commit 940a9e0f721c8498ebc23888171dac7046660278 Author: Greg Kroah-Hartman Date: Fri Jul 24 14:34:28 2009 -0700 Linux 2.6.27.28 commit 92dc81cd7d1bb79372d8428bdd32e63efa049a2c Author: Linus Torvalds Date: Wed Jul 22 08:49:22 2009 -0700 fbmon: work around compiler bug in gcc-4.2.4 commit 3730793d457fed79a6d49bae72996d458c8e4f2d upstream. There's some odd bug in gcc-4.2 where it miscompiles a simple loop whent he loop counter is of type 'unsigned char' and it should count to 128. The compiler will incorrectly decide that a trivial loop like this: unsigned char i, ... for (i = 0; i < 128; i++) { .. is endless, and will compile it to a single instruction that just branches to itself. This was triggered by the addition of '-fno-strict-overflow', and we could play games with compiler versions and go back to '-fwrapv' instead, but the trivial way to avoid it is to just make the loop induction variable be an 'int' instead. Thanks to Krzysztof Oledzki for reporting and testing and to Troy Moure for digging through assembler differences and finding it. Reported-and-tested-by: Krzysztof Oledzki Found-by: Troy Moure Gcc-bug-acked-by: Ian Lance Taylor Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman