The page http://java.sun.com/developer/earlyAccess/adding_generics/ has a zip file adding_generics-2_4-ea.zip, which containts gjc-rt.jar. Compiling it by 1) gcj --main=com.sun.tools.javac.Main gjc-rt.jar 2) gcj --main=com.sun.tools.javac.Main com/sun/tools/*/*.class gives the internal compiler error in both cases.
On the mainline we get: com/sun/tools/doclets/internal/toolkit/util/VisibleMemberMap.java: In class 'com.sun.tools.doclets.internal.toolkit.util.VisibleMemberMap$ClassMembers': com/sun/tools/doclets/internal/toolkit/util/VisibleMemberMap.java: In method 'com.sun.tools.doclets.internal.toolkit.util.VisibleMemberMap$ClassMembers.getClassMembers(com.su n.javadoc.ClassDoc,boolean)': com/sun/tools/doclets/internal/toolkit/util/VisibleMemberMap.java:337: error: verification error at PC=207 com/sun/tools/doclets/internal/toolkit/util/VisibleMemberMap.java:337: error: invalid argument type com/sun/tools/doclets/internal/toolkit/util/VisibleMemberMap.java:337: error: expected type 'com.sun.javadoc.ProgramElementDoc[]' but stack contains 'java.lang.Object[]' java/util/LinkedList.java: In class 'com.sun.tools.doclets.internal.toolkit.builders.LayoutParser': java/util/LinkedList.java: In method 'com.sun.tools.doclets.internal.toolkit.builders.LayoutParser.parseXML(java.lang.String)': java/util/LinkedList.java:64: error: cannot find file for class javax.xml.parsers.SAXParserFactory java/util/LinkedList.java:64: error: cannot find file for class javax.xml.parsers.SAXParserFactory java/util/LinkedList.java:64: error: cannot find file for class javax.xml.parsers.SAXParser java/util/LinkedList.java:72: error: cannot find file for class javax.xml.parsers.SAXParserFactory java/util/LinkedList.java:72: internal compiler error: Bus error Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Subject: Re: internal compiler error: in size_binop, at fold-const.c:1598 I receive (with GCC 3.4.2, compiled with GCC 3.4.1, on Mac OS 10.3.5): for 1) : com/sun/tools/javac/code/Source.java: In class `com.sun.tools.javac.code.Source': com/sun/tools/javac/code/Source.java: In method `com.sun.tools.javac.code.Source.instance(com.sun.tools.javac.util.Context)': com/sun/tools/javac/code/Source.java:51: internal compiler error: in size_binop, at fold-const.c:1598 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. for 2) : /var/tmp//ccrpzlx6.s:117:FATAL:Symbol __ZN3com3sun5tools7javadoc20JavadocClassReader$14makeEv already defined. /var/tmp//ccrpzlx6.s:116:FATAL:Symbol __ZN3com3sun5tools7javadoc14JavadocEnter$14makeEv already defined. /var/tmp//ccrpzlx6.s:116:FATAL:Symbol __ZN3com3sun5tools7javadoc20JavadocMemberEnter$14makeEv already defined. /var/tmp//ccrpzlx6.s:116:FATAL:Symbol __ZN3com3sun5tools7javadoc13JavadocTodo$14makeEv already defined. /var/tmp//ccrpzlx6.s:147:FATAL:Symbol __ZN3com3sun5tools7javadoc10Messager$14makeEv already defined. /var/tmp//ccrpzlx6.s:213:FATAL:Symbol __ZN3com3sun5tools7javadoc10Messager$24makeEv already defined. com/sun/tools/javadoc/Start.java: In class `com.sun.tools.javadoc.Start': com/sun/tools/javadoc/Start.java: In method `com.sun.tools.javadoc.Start.parseAndExecute(java.lang.String[])': com/sun/tools/javadoc/Start.java:195: internal compiler error: in size_binop, at fold-const.c:1598 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. My configuration can be seen at: http://gcc.gnu.org/ml/gcc/2004-09/msg00677.html Bytheway, I saw GCC 3.4.3 came out. I have to recheck my 2 bugreports against 3.4.3. Tomorrow will be a compilation day! :)
Subject: Re: internal compiler error: in size_binop, at fold-const.c:1598 Problems exists still with GCC 3.4.3. for 1) like with GCJ 3.4.2 for 2) very similar /var/tmp//ccl50gLh.s:117:FATAL:Symbol __ZN3com3sun5tools7javadoc20JavadocClassReader$14makeEv already defined. /var/tmp//ccl50gLh.s:116:FATAL:Symbol __ZN3com3sun5tools7javadoc14JavadocEnter$14makeEv already defined. /var/tmp//ccl50gLh.s:116:FATAL:Symbol __ZN3com3sun5tools7javadoc20JavadocMemberEnter$14makeEv already defined. /var/tmp//ccl50gLh.s:116:FATAL:Symbol __ZN3com3sun5tools7javadoc13JavadocTodo$14makeEv already defined. /var/tmp//ccl50gLh.s:147:FATAL:Symbol __ZN3com3sun5tools7javadoc10Messager$14makeEv already defined. /var/tmp//ccl50gLh.s:213:FATAL:Symbol __ZN3com3sun5tools7javadoc10Messager$24makeEv already defined. com/sun/tools/javadoc/Start.java: In class `com.sun.tools.javadoc.Start': com/sun/tools/javadoc/Start.java: In method `com.sun.tools.javadoc.Start.parseAndExecute(java.lang.String[])': com/sun/tools/javadoc/Start.java:195: internal compiler error: in size_binop, at fold-const.c:1598 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. Bojan
Created attachment 8228 [details] testcase This is a 6K jar that exhibits the same behaviour: $ /usr/lib/gcc-snapshot/bin/gcj --indirect-dispatch N.jar bossa/syntax/ast.nice:0: internal compiler error: in size_binop, at fold-const.c:1637 That's with gcj 4.0.0 20050212. Note that if you remove any of the three classes from the jar, the bug does not occur. Neither does it if you unpack the jar and call gcj on the three classes directly.
Created attachment 8264 [details] patch Try this patch
Patch works for me on the small testcase (N.jar). I'll try on the whole jar when I get the chance.
I tried the patched gcj on the whole jar (containing the Nice compiler), and this error does not occur (nor any other, yay!). As far as I can tell, Andrew's patch fixes this bug.
Subject: Bug 18362 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-4_0-branch Changes by: aph@gcc.gnu.org 2005-03-04 15:32:44 Modified files: gcc/java : ChangeLog class.c Log message: 2005-03-04 Andrew Haley <aph@redhat.com> PR java/18362 * class.c (set_method_index): Don't set method_index if it is NULL_TREE. (layout_class_method): Don't complain about "non-static method foo overrides static method" in the case of indirect dispatch. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.1556&r2=1.1556.2.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/class.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.220&r2=1.220.8.1
Subject: Bug 18362 CVSROOT: /cvs/gcc Module name: gcc Changes by: aph@gcc.gnu.org 2005-03-04 15:38:14 Modified files: gcc/java : ChangeLog class.c Log message: 2005-03-04 Andrew Haley <aph@redhat.com> PR java/18362 * class.c (set_method_index): Don't set method_index if it is NULL_TREE. (layout_class_method): Don't complain about "non-static method foo overrides static method" in the case of indirect dispatch. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/ChangeLog.diff?cvsroot=gcc&r1=1.1560&r2=1.1561 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/class.c.diff?cvsroot=gcc&r1=1.220&r2=1.221
Verified. The patch works for me. (I can't really set to verified since I'm not the original submitter)
Fixed.