From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.3+) Gecko/20010817 Description of problem: I tried to compile Sun's Java HotSpot using gcc3 compiler. I had to fix a lot of sources (mostly about implicitly friends with itself ) to be able to compile but eventually I got gcc crash: cd /root/JavaSRC/hotspot1.3.1/build/linux # ./build.sh optimized /root/JavaSRC/hotspot1.3.1 ### ENVIRONMENT SETTINGS: JAVA_HOME=/usr/local/jdks/jdk1.3.1_01 LD_LIBRARY_PATH=/usr/local/jdks/jdk1.3.1_01/jre/lib/i686:/usr/local/jdks/jdk1.3.1_01/jre/lib/i686/native_threads:. CLASSPATH=/usr/local/jdks/jdk1.3.1_01/jre/lib/rt.jar:. GNUMAKE=gmake ### gmake -f /root/JavaSRC/hotspot1.3.1/build/linux/Makefile optimized GAMMADIR=/root/JavaSRC/hotspot1.3.1 (cd linux_i486_compiler2/optimized; gmake) gmake[1]: Entering directory `/root/JavaSRC/hotspot1.3.1/build/linux/linux_i486_compiler2/optimized' gmake[2]: Entering directory `/root/JavaSRC/hotspot1.3.1/build/linux/linux_i486_compiler2/optimized' Rescanned ../generated/adfiles/linux_i486.ad but encountered no changes. gmake[2]: Leaving directory `/root/JavaSRC/hotspot1.3.1/build/linux/linux_i486_compiler2/optimized' gmake[2]: Entering directory `/root/JavaSRC/hotspot1.3.1/build/linux/linux_i486_compiler2/optimized' Compiling /root/JavaSRC/hotspot1.3.1/src/share/vm/runtime/classFileParser.cpp In file included from /root/JavaSRC/hotspot1.3.1/src/share/vm/oops/constantPoolOop.hpp:60, from /root/JavaSRC/hotspot1.3.1/src/cpu/i486/vm/assembler_i486.hpp:83: /root/JavaSRC/hotspot1.3.1/src/os_cpu/linux_i486/vm/bytes_linux_i486.inline.hpp:53: Internal error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions. gmake[2]: *** [classFileParser.o] Error 1 gmake[2]: Leaving directory `/root/JavaSRC/hotspot1.3.1/build/linux/linux_i486_compiler2/optimized' gmake[1]: *** [the_vm] Error 2 gmake[1]: Leaving directory `/root/JavaSRC/hotspot1.3.1/build/linux/linux_i486_compiler2/optimized' gmake: *** [optimized] Error 2 Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: Download Sun's Java sources from http://www.sun.com/communitysource/ Try to compiler them using gcc3. During compilation you will have to fix sources in order to proceed. The fixes are mostly related to 'implicitly friends with itself' error. Thit is easy to fix. In ./hotspot1.3.1/src/share/vm/adlc/output_h.cpp you will have to comment out line 801: fprintf(fp_hpp, " friend class Pipeline_Use;\n\n"); in order to proceed. At the end you should get the compiler crash. Actual Results: ### ENVIRONMENT SETTINGS: JAVA_HOME=/usr/local/jdks/jdk1.3.1_01 LD_LIBRARY_PATH=/usr/local/jdks/jdk1.3.1_01/jre/lib/i686:/usr/local/jdks/jdk1.3.1_01/jre/lib/i686/native_threads:. CLASSPATH=/usr/local/jdks/jdk1.3.1_01/jre/lib/rt.jar:. GNUMAKE=gmake ### gmake -f /root/JavaSRC/hotspot1.3.1/build/linux/Makefile optimized GAMMADIR=/root/JavaSRC/hotspot1.3.1 (cd linux_i486_compiler2/optimized; gmake) gmake[1]: Entering directory `/root/JavaSRC/hotspot1.3.1/build/linux/linux_i486_compiler2/optimized' gmake[2]: Entering directory `/root/JavaSRC/hotspot1.3.1/build/linux/linux_i486_compiler2/optimized' Rescanned ../generated/adfiles/linux_i486.ad but encountered no changes. gmake[2]: Leaving directory `/root/JavaSRC/hotspot1.3.1/build/linux/linux_i486_compiler2/optimized' gmake[2]: Entering directory `/root/JavaSRC/hotspot1.3.1/build/linux/linux_i486_compiler2/optimized' Compiling /root/JavaSRC/hotspot1.3.1/src/share/vm/runtime/classFileParser.cpp In file included from /root/JavaSRC/hotspot1.3.1/src/share/vm/oops/constantPoolOop.hpp:60, from /root/JavaSRC/hotspot1.3.1/src/cpu/i486/vm/assembler_i486.hpp:83: /root/JavaSRC/hotspot1.3.1/src/os_cpu/linux_i486/vm/bytes_linux_i486.inline.hpp:53: Internal error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions. gmake[2]: *** [classFileParser.o] Error 1 gmake[2]: Leaving directory `/root/JavaSRC/hotspot1.3.1/build/linux/linux_i486_compiler2/optimized' gmake[1]: *** [the_vm] Error 2 gmake[1]: Leaving directory `/root/JavaSRC/hotspot1.3.1/build/linux/linux_i486_compiler2/optimized' gmake: *** [optimized] Error 2 Expected Results: everything but not crash Additional info: Initially I tried to compiled the stuff using 2.96-97 compiler but I wound up with the situation which could be illustrated on the following example: class A { public: static void f(); static void f(int); }; void A::f() { } void A::f(int c) { } int main(int argc,char ** argv) { void (*ptr)(); ptr=A::f; return 0; } I got the following error message: t.cc:13: assuming & on overloaded member function
*** This bug has been marked as a duplicate of 52960 ***