Bug 22090

Summary: Attempt to compile java1.5 classes with gcj
Product: gcc Reporter: Thierry Viéville <Thierry.Vieville>
Component: libgcjAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal CC: gcc-bugs, java-prs
Priority: P2    
Version: 4.1.0   
Target Milestone: 4.3.0   
Host: Target: i686-linux-gnu
Build: Known to work:
Known to fail: Last reconfirmed:
Bug Depends on: 28067    
Bug Blocks: 22091    

Description Thierry Viéville 2005-06-16 12:15:18 UTC
* I have a set of java classes http://www-sop.inria.fr/odyssee/imp of every day
use, things were 100% ok using gcj when it was java1.[34]. Now in java1.5
everything is ok with the sun jdk1.5 but i still want to reuse gcj  for obvious
reasons
 * With gcc-4.1
            Linux  2.6.10-1.766_FC3 #1 Wed Feb 9 23:06:42 EST 2005 i686 i686
i386 GNU/Linux
               gcj (GCC) 4.1.0 20050610 (experimental)
          - the header compilation (using gcjh) seems perfect
http://www-sop.inria.fr/odyssee/imp/gcj/include/index.html providing that
generic types are mapped onto ::java::lang::Object (which seems fair to me
considering the Java5 generics design)
          - if i try to compile java1.5 sources i get a huge set of errors
          - if i try to compile java1.5 classes (pre-compiled by the sun jdk1.5)
it seems to be almost ok except these ``internal´´ errors (i.e. erros occuring
in java.* classes used by the user classes):
class 'java.lang.Integer' has no method named 'valueOf' matching signature
'(I)Ljava/lang/Integer;'
class 'java.lang.Double' has no method named 'valueOf' matching signature
'(D)Ljava/lang/Double;'
class 'java.util.regex.Matcher' has no method named 'region' matching signature
'(II)Ljava/util/regex/Matcher;'
class 'java.util.regex.Matcher' has no method named 'usePattern' matching signature
 class 'java.math.BigDecimal' has no method named '<init>' matching signature '(J)V
  ====> This seems to be obvious errors  . . is there a solution ?
       ? introduce element in the class-path ?
       ? uses a specific libgcj ?

--- detailled description follows -------


/usr/local/gcc-4.1/bin/gcj -classpath $USER_CLASS_DIRECTORY -c $USER_CLASS_FILES
java/lang/Throwable.java: In class 'imp.util.Servlet':
java/lang/Throwable.java: In method 'imp.util.Servlet.check(int,boolean)':
java/lang/Throwable.java:237: error: class 'java.lang.Integer' has no method
named 'valueOf' matching signature '(I)Ljava/lang/Integer;'
java/lang/Throwable.java:237: error: class 'java.lang.Integer' has no method
named 'valueOf' matching signature '(I)Ljava/lang/Integer;'
java/lang/Throwable.java:237: error: class 'java.lang.Integer' has no method
named 'valueOf' matching signature '(I)Ljava/lang/Integer;'
java/lang/String.java: In class 'imp.util.PatternReader':
java/lang/String.java: In method
'imp.util.PatternReader.read(java.lang.String,java.lang.String,int)':
java/lang/String.java:69: error: class 'java.util.regex.Matcher' has no method
named 'usePattern' matching signature
'(Ljava/util/regex/Pattern;)Ljava/util/regex/Matcher;'
java/lang/String.java:70: error: class 'java.util.regex.Matcher' has no method
named 'region' matching signature '(II)Ljava/util/regex/Matcher;'
imp/util/Servlet.java: In class 'imp.util.Servlet$Connection':
imp/util/Servlet.java: In method 'imp.util.Servlet$Connection.run()':
imp/util/Servlet.java:190: error: class 'java.lang.Integer' has no method named
'valueOf' matching signature '(I)Ljava/lang/Integer;'
java/lang/Throwable.java: In class 'imp.classifier.Mapping':
java/lang/Throwable.java: In method 'imp.classifier.Mapping.map()':
java/lang/Throwable.java:123: error: class 'java.lang.Double' has no method
named 'valueOf' matching signature '(D)Ljava/lang/Double;'
java/lang/Throwable.java:123: error: class 'java.lang.Integer' has no method
named 'valueOf' matching signature '(I)Ljava/lang/Integer;'
java/util/HashMap.java: In class 'imp.core.AbstractValue':
java/util/HashMap.java: In method
'imp.core.AbstractValue.compare(imp.core.Value,imp.core.Value,java.util.HashMap)':
java/util/HashMap.java:69: error: class 'java.lang.Integer' has no method named
'valueOf' matching signature '(I)Ljava/lang/Integer;'
java/util/HashMap.java:75: error: class 'java.lang.Integer' has no method named
'valueOf' matching signature '(I)Ljava/lang/Integer;'
java/util/HashMap.java:76: error: class 'java.lang.Integer' has no method named
'valueOf' matching signature '(I)Ljava/lang/Integer;'
java/util/HashMap.java:78: error: class 'java.lang.Integer' has no method named
'valueOf' matching signature '(I)Ljava/lang/Integer;'
java/util/HashMap.java:79: error: class 'java.lang.Integer' has no method named
'valueOf' matching signature '(I)Ljava/lang/Integer;'
java/util/HashMap.java:84: error: class 'java.lang.Integer' has no method named
'valueOf' matching signature '(I)Ljava/lang/Integer;'
java/util/HashMap.java:85: error: class 'java.lang.Integer' has no method named
'valueOf' matching signature '(I)Ljava/lang/Integer;'
java/util/HashMap.java:86: error: class 'java.lang.Integer' has no method named
'valueOf' matching signature '(I)Ljava/lang/Integer;'
java/util/HashMap.java:89: error: class 'java.lang.Integer' has no method named
'valueOf' matching signature '(I)Ljava/lang/Integer;'
java/util/HashMap.java:90: error: class 'java.lang.Integer' has no method named
'valueOf' matching signature '(I)Ljava/lang/Integer;'
java/util/HashMap.java:92: error: class 'java.lang.Integer' has no method named
'valueOf' matching signature '(I)Ljava/lang/Integer;'
java/util/HashMap.java:95: error: class 'java.lang.Integer' has no method named
'valueOf' matching signature '(I)Ljava/lang/Integer;'
imp/core/Functions.java: In class 'imp.core.Wrapper':
imp/core/Functions.java: In method
'imp.core.Wrapper.add(java.lang.String,java.lang.Object,int,imp.core.Value)':
imp/core/Functions.java:154: error: class 'java.lang.Integer' has no method
named 'valueOf' matching signature '(I)Ljava/lang/Integer;'
imp/core/Operator.java: In class 'imp.core.Operator$1':
imp/core/Operator.java: In method
'imp.core.Operator$1.call(imp.core.LogicalStructure)':
imp/core/Operator.java:226: error: class 'java.lang.Integer' has no method named
'valueOf' matching signature '(I)Ljava/lang/Integer;'
imp/core/Operator.java:226: error: class 'java.lang.Integer' has no method named
'valueOf' matching signature '(I)Ljava/lang/Integer;'
java/lang/String.java: In class 'imp.core.NumberValue':
java/lang/String.java: In method 'imp.core.NumberValue.set(long)':
java/lang/String.java:43: error: class 'java.math.BigDecimal' has no method
named '<init>' matching signature '(J)V'
java/lang/String.java:43: error: expected type 'java.math.BigDecimal' but stack
contains 'java.math.BigDecimal'
java/lang/String.java: In method 'imp.core.NumberValue.inverse()':
java/lang/String.java:86: error: class 'java.math.BigDecimal' has no method
named '<init>' matching signature '(I)V'
java/lang/String.java:86: internal compiler error: in push_type, at java/expr.c:272
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
imp/ima/util/Momenta.java: In class 'imp.ima.util.Momenta$Blob':
imp/ima/util/Momenta.java: In method 'imp.ima.util.Momenta$Blob.add(int,int)':
imp/ima/util/Momenta.java:108: error: class 'java.lang.Integer' has no method
named 'valueOf' matching signature '(I)Ljava/lang/Integer;'
imp/ima/util/Momenta.java:110: error: class 'java.lang.Integer' has no method
named 'valueOf' matching signature '(I)Ljava/lang/Integer;'
Comment 1 Tom Tromey 2007-01-09 20:47:44 UTC
All gcj front end bugs have been fixed by the gcj-eclipse branch merge.
I'm mass-closing the affected PRs.
If you believe one of these was closed in error, please reopen it
with a note explaining why.
Thanks.