Too optimized and not so much optimized code

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Mon Mar 13 00:18:00 GMT 2000


> I came across a bit strange egcs-1.1.2 behaviour

Thanks for your bug report. gcc-2.95.2 generates the code below, so the bug
appears to be fixed.

Regards,
Martin

	.file	"a.c"
	.version	"01.01"
gcc2_compiled.:
.text
	.align 4
.globl expand
	.type	 expand,@function
expand:
	xorl %eax,%eax
	movb 4(%esp),%al
	ret
.Lfe1:
	.size	 expand,.Lfe1-expand
	.align 4
.globl mult_256
	.type	 mult_256,@function
mult_256:
	subl $28,%esp
	movl 32(%esp),%eax
	movl $0,12(%esp)
	movb %al,13(%esp)
	movl 12(%esp),%eax
	addl $28,%esp
	ret
.Lfe2:
	.size	 mult_256,.Lfe2-mult_256
	.ident	"GCC: (GNU) 2.95.2 19991024 (release)"


More information about the Gcc-bugs mailing list