bug in reserving memory for large arrays?

Hrafnkell Eiriksson hkelle@rhi.hi.is
Sat Oct 24 11:50:00 GMT 1998


Hi

The following program does not run when compiled with
egcs-1.1 on linux. It produces a SIGSEGV

#include <complex>

void main() {
	complex<float> x[1048576];
}

It does compile and run on HPUX (using gcc-2.8.1).
Is this a compiler bug, g++ library bug or just limited stack size?
I've attached a tar.gz file with the program, g++ output
when run with -v --save-temps, and all the temp files (.ii)

Thanks
  Hrafnkell

-- 
//-----------------------//-------------------------------------------------
//  Hrafnkell Eiriksson  //  Student of Computer- and Electrical engineering
//  hkelle@rhi.hi.is     //  at the Univeristy of Iceland
//                       //  "Blessed are they who go around in circles,
//  Finger for PGP key   //   for they shall be known as Wheels"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug.tar.gz
Type: application/octet-stream
Size: 1350 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/19981024/29fdfa59/attachment.obj>


More information about the Gcc-bugs mailing list