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: Internal compiler error!


Quoting John Vaul (J.A.Vaul@Bradford.ac.uk):
> Hello
> 
> I have just been playing around with the g++ compiler and have got the
> following message:
> 
> test2.cpp: In function 'int main()':
> test2.cpp:22: internal compiler error:
> test2.cpp:22: please submit a full bug report.....
> 
> I have no idea what a full bug report is, but here goes:

Hi,
your program is essentially in C (if you leave out iostream).
gcc -o prog prog.c says:
prog.c:4: size of array `ex' is too large
prog.c:5: size of array `ey' is too large
prog.c:6: size of array `ez' is too large
prog.c:7 size of array `hx' is too large
prog.c:8 size of array `hy' is too large
prog.c:9 size of array `hz' is too large

g++ -p prog prog.c says:
/usr/src/egcs-1.1/gcc/dwarf2out.c:940: 
    Internal compiler error in function reg_save

Strange: i though prog.c would tell g++, it has to invoke the C-compiler -
so why the difference?

Your problem is, that you allocate about 73 GByte
(200^4*6*8 Byte) of memory on the stack!
Are you shure, your computer has that much RAM/space on harddisk?
Unless you have a 64 Bit architecture, you even won't have that
much address space.

Even if that was correct, your program tries to access e.g.
ex[999][999][999][1], but you never declared such a large array!

However, an ICE should not happen, even for code like this.

Hope, that helps,
Martin.


-- 
How does a UNIX Guru do Sex ?
 unzip;strip;touch;finger;mount;fsck;more;yes;umount;sleep


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