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]

allocation of large arrays, GCC 3.2, SPARC


Using GCC 3.2 on a SPARC/Solaris 8 system (64-bit), if I compile the
following 1-line program:

int s[28][256][16][4096][2][2];

with "gcc -m64 -S", the resulting assembly file contains the line

	.common s,3221225472,4

What it should say is

	.common s,7516192768,4

so it appears that truncation by 2^32 has occured.  This causes a
segmentation fault if code tries to access the higher parts of the
array.

				Joe Weening


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