This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [BUG] 256 MB arrays offset segfaults


> Could someone, please, fix this in future releases of GCC?

Thanks for your bug report. The mainline compiler (2.96 20000408
(experimental)) generates

	.file	"memfault.c"
	.version	"01.01"
gcc2_compiled.:
.text
	.align 16
.globl main
	.type	 main,@function
main:
	pushl	%ebp
	movl	%esp, %ebp
	subl	$8, %esp
	movl	$268435455, -8(%ebp)
	movsbl	c+268435455,%eax
	movl	%eax, -4(%ebp)
	movl	$c, %edx
	movl	-8(%ebp), %eax
	movsbl	(%eax,%edx),%eax
	movl	%eax, -4(%ebp)
	movl	$c, %edx
	movl	$268435456, %eax
	movsbl	(%eax,%edx),%eax
	movl	%eax, -4(%ebp)
	movl	$1, %eax
	movl	%ebp, %esp
	popl	%ebp
	ret
.Lfe1:
	.size	 main,.Lfe1-main
	.comm	c,268435556,32
	.ident	"GCC: (GNU) 2.96 20000408 (experimental)"

so the bug appears to be fixed.

Regards,
Martin

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]