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]
Other format: [Raw text]

Possible C compiler bug


I get a segmentation fault when a C program allocates
an 8MB array in the subroutine "main()".  The
specifics are listed below.  Any help understanding
if this is a bug would be greatly appreciated.

Thanks,
Bob


gcc version
===========
gcc -v produces:
Reading specs from
/usr/libexec/gcc/darwin/ppc/3.1/specs
Thread model: posix
Apple Computer, Inc. GCC version 1256, based on gcc
version 3.1 20021003 (prerelease)

input file
==========
input file called debug.c contains:
main()
{
float a[2048][1024];
}

compiler options
================
no compiler options were given (command was: gcc
debug.c)

.i file
=======
compiling with the -save-temps flag produces the
following .i file:
# 1 "debug.c"
main ( )
{
float a [ 2048 ] [ 1024 ] ;
}

machine and OS
==============
Apple PowerBook G4 running Mac OS X Version 10.3.8
Build 7U16

compiler cofiguration
=====================
used default configuration for Apple Developer's Kit

incorrect output
================
running a.out produces the following error:
Segmentation fault




	
		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail


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