This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/50922] infinite loop when optimized
- From: "pfister at pci dot uzh.ch" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 31 Oct 2011 11:01:33 +0000
- Subject: [Bug c/50922] infinite loop when optimized
- Auto-submitted: auto-generated
- References: <bug-50922-4@http.gcc.gnu.org/bugzilla/>
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