The g++ compiler reports the error "internal compiler error: Segmentation fault" when the attached (reduced) file is compiled. The fault seems to depend on inclusion of a destructor (last (only) method in the file). If the destructor is omitted, the file compiles. The error originally occurred when a single space was added to a string -- the attached, preprocessed, file was reduced from the original by a process of elimination.
g++ version info:
g++ (GCC) 4.3.0 20080428 (Red Hat 4.3.0-8)
I have not been able to test this on a later version of the compiler.
Created attachment 16533 [details]
Test Case -- preprocessed code
Works for me with 4.3.0, 4.3.1 and 4.3.2. What options did you use to get
I think I have mis-stated this bug as a compiler fault. When I tried to
reproduce it just now it did not happen again. The reason appears to be that I
restarted my machine.
The environment is Fedora 9 running in a VMware virtual machine (VMware Server
VMX 188.8.131.52355; Server Console 1.0.6 build 91891) under Microsoft Windows
Vista (SP1 + later updates). It had been running for about a week when the
problem occurred. It happened again and again yesterday but exactly the same
code now works perfectly. It looks as if something happened in the VMware
machine. (It did not occur to me to try a restart).
I think you can change the status to "works for me" and close the bug report.
For the record, the fault occurred with the simple command line:
g++ -c /tmp/gcc_fault_example.ii
Thanks for the rapid response.
So mentioned close as works for me.