This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/13117] New: Verry large arrays wont compile.
- From: "ehadint at nps dot navy dot mil" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Nov 2003 00:34:46 -0000
- Subject: [Bug c/13117] New: Verry large arrays wont compile.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
is there a limit on the size of arrays in GCC
when i try to compile the program
#include <stdio.h>
#include <math.h>
#define X 128
#define Y 128
#define Z 128
#define T 129
double A[X][Y][Z][T];
int x, y, z, t;
main() {
printf("\nprogram uses %g MBytes\n",X*Y*Z*T*8.0/1.0e6);
for (x=0;x<X;++x) {
for (y=0;y<Y;++y) {
for (z=0;z<Z;++z) {
for (t=0;t<T;++t) {
A[x][y][z][t]=sin(x+1)/sin(y+1)/sin(z+1)/sin(t+1);
}
}
}
}
}
i get the error
[felg0:~] ehadint% cc -mcpu=970 sizec.c
sizec.c:12: error: size of variable `A' is too large
this array should be usable on a G5 p970 proccesor. i dont know how to fix this.
--
Summary: Verry large arrays wont compile.
Product: gcc
Version: 3.3
Status: UNCONFIRMED
Severity: critical
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ehadint at nps dot navy dot mil
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: Darwin G5
GCC host triplet: gcc3.3.1
GCC target triplet: Darwin G5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13117