From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 Description of problem: I checked the other bug with the same error message and it didn't help me. I get this error message when trying to compile. I have isolated the line that causes the compiler to crash, but I see no error in the code. The line that crashes the compiler is line 289 of the attached In_out.cpp. Attached are the files needed to make the project, and the Makefile. Use "make data_test.cpp" to compile the right one. Version-Release number of selected component (if applicable): gcc version 3.2.3 How reproducible: Didn't try Additional info:
Created attachment 115562 [details] file with bug in it
Created attachment 115563 [details] neccessary file
Created attachment 115564 [details] neccessary file
Created attachment 115565 [details] neccessary file
Created attachment 115566 [details] neccessary file
Created attachment 115567 [details] neccessary file
Created attachment 115568 [details] neccessary file
Created attachment 115569 [details] neccessary file
Created attachment 115570 [details] neccessary file
Created attachment 115571 [details] neccessary file
Created attachment 115572 [details] neccessary file
Created attachment 115573 [details] neccessary file
Sorry for so many files and semi-ugly code. It is rough and hasn't been touched up yet.
Please, can you instead: 1) post the full gcc (resp. g++) command line which causes the compiler crash 2) post the error output of that command 3) add -save-temps option to those alreadu used and rerun it 4) the last step creates an .i resp. .ii file, please attach it here A preprocessed file has the advantage that it is self-contained, therefore doesn't depend on the exact version of the system headers etc. You can look at http://gcc.gnu.org/bugs.html for details why is that preferrable. Thanks.
"3) add -save-temps option to those alreadu used and rerun it" add that to what already used? I'm not sure what you want me to use that flag with.
Say the full command line (as requested in 1) above) is g++ -g -O2 -fPIC -Wall -march=i686 -msse2 somefile.C and you get internal compiler error when compiling somefile.C with those options. Then for 3) you run also g++ -g -O2 -fPIC -Wall -march=i686 -msse2 somefile.C -save-temps and attach here somefile.ii it creates.
The full command line to compile the file that causes the error is: g++ -g -Wall -c In_out.cpp and I get the error message: g++: Internal error: Segmentation fault (program cc1plus) Please submit a full bug report. See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions. make: *** [In_out.o] Error 1 (along with some unused variable warnings)
Created attachment 115619 [details] requested file
Created attachment 115620 [details] the makefile forgot to attach this last time, this is the makefile I use.
I would just like to give a small update. I took pretty much the same code (changed a litte for Microsoft's scoping) and it compiled fine on Visual C++. However, the reason I need it to compile on the Linux is so that I can compare its results to the results of something else. Thanks.
The thing that the program is attempting to do (passing ~ 34.5MB argument by value to Score(AEE, datavar)) requires that the stack is allowed to grow to at least that size, but the default stack limit in RHEL3 is 8-10MB, see ulimit -s (are you sure you did not mean to pass that argument by reference?). Now, the compiler when compiling such program needs approximately the same size on its stack as well. The compiler perhaps could detect excessively huge argument size and use malloc instead of alloca for the temporary array it uses, but you need bigger stack limit when running the program anyway and passing > 8MB arguments by value is certainly not something the vast majority of programs ever does. So I don't think this is something that needs to be changed in RHEL3 errata.
Oh, forgot to say, if you compile with ulimit -s 40000 or ulimit -s unlimited, it will compile just fine.