BUG: egcs-1.1.2 generates wrong code

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Fri Feb 4 00:57:00 GMT 2000


> Am I dreaming, or is that a compiler bug?

Thanks for your bug report. It looks like a real bug to me. With gcc
2.95, I could not reproduce it; I'll attach the 2.95.2-generated code
below. I recommend to upgrade.

Regards,
Martin

	.file	"test.c"
	.version	"01.01"
gcc2_compiled.:
.text
	.align 4
.globl fill
	.type	 fill,@function
fill:
	pushl %ebp
	movl %esp,%ebp
	subl $40,%esp
	leal -16(%ebp),%edx
	leal -24(%ebp),%eax
	movl $1,%ecx
	.p2align 4,,7
.L5:
	decl %ecx
	jns .L5
	movl $0,16(%edx)
	movl $0,20(%edx)
	movl $198,8(%eax)
	addl $-8,%esp
	pushl %eax
	pushl %edx
	call printf
	movl %ebp,%esp
	popl %ebp
	ret
.Lfe1:
	.size	 fill,.Lfe1-fill
	.ident	"GCC: (GNU) 2.95.2 19991024 (release)"


More information about the Gcc-bugs mailing list