[Bug c/18700] New: Infinite loop with ranged for() loop

sa2c at sa2c dot net gcc-bugzilla@gcc.gnu.org
Sun Nov 28 05:21:00 GMT 2004


the code:
void foo()
{
	int i;
	for (i = 0; i <= 0x7fffffff; i++)
		;
}
compiled with "-O -S" procudes the following assembly.
foo:
	pushl	%ebp
	movl	%esp, %ebp
.L2:
	jmp	.L2

-- 
           Summary: Infinite loop with ranged for() loop
           Product: gcc
           Version: 3.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sa2c at sa2c dot net
                CC: gcc-bugs at gcc dot gnu dot org,sa2c at sa2c dot net
 GCC build triplet: i386-unknown-freebsd5.3
  GCC host triplet: i386-unknown-freebsd5.3
GCC target triplet: i386-unknown-freebsd5.3


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18700



More information about the Gcc-bugs mailing list