[Bug c/50922] infinite loop when optimized
pfister at pci dot uzh.ch
gcc-bugzilla@gcc.gnu.org
Mon Oct 31 11:02:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50922
--- Comment #6 from Rolf Pfister <pfister at pci dot uzh.ch> 2011-10-31 11:01:33 UTC ---
Am 31.10.11 11:18, schrieb manu at gcc dot gnu.org:
>
> http://gcc.gnu.org/wiki/FAQ#signed_overflow
>
Im not really convinced that the reason is the overflow.
Where is the overflow in this case?
long x=2147483647;
ulong c;
for(c=0;c<2147483648UL;c++)
{
lcdSendData(x--);
}
At least with "gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48)"
this also gives an infinite loop.
Rolf
More information about the Gcc-bugs
mailing list