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]

[Bug c/11258] New: allocation of large arrays, sparc


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11258

           Summary: allocation of large arrays, sparc
           Product: gcc
           Version: 3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jweening@ccrwest.org
                CC: gcc-bugs@gcc.gnu.org
 GCC build triplet: sparc-sun-solaris2.9
  GCC host triplet: sparc-sun-solaris2.9
GCC target triplet: sparc-sun-solaris2.9

When a large static array is allocated, GCC appears to be outputting its
size mod 2^32 in the assembly code.  For example, compile the following
program on a 64-bit SPARC system with "gcc -m64 -S".

int s[7000][1000000];

The assembly code then contains the line

	.common s,2230196224,4

The correct output would be

	.common s,28000000000,4

The result is a segmentation fault when the program access too far into
the array.


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