This is the mail archive of the
java-prs@gcc.gnu.org
mailing list for the Java project.
[Bug java/40888] New: gcj -C has problems with clone()
- From: "gnu_andrew at member dot fsf dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: java-prs at gcc dot gnu dot org
- Date: 28 Jul 2009 11:51:56 -0000
- Subject: [Bug java/40888] New: gcj -C has problems with clone()
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
When trying to use gcj -C instead of a symlink to ecj as gcj's javac (with
options appropriately changed with a script), I ran across an interesting issue
building OpenJDK:
gcj -C -g -d lib/hotspot-tools -fsource=1.5
-I'hotspot-tools:/home/andrew/projects/openjdk/icedtea/netx:/mnt/builder/icedtea/generated:openjdk/jdk/src/share/classes:openjdk/jdk/src/solaris/classes:openjdk/langtools/src/share/classes:openjdk/jaxp/src/share/classes:openjdk/corba/src/share/classes:openjdk/jaxws/src/share/classes'
-bootclasspath \'\' -w @hotspot-tools-source-files.txt
(-w added so the errors aren't lost in 12k+ warnings)
hotspot-tools/com/sun/codemodel/internal/JClass.java:269: error: The
constructor JNarrowedClass(JClass, List<Object>) is \
undefined
return new JNarrowedClass(this,Arrays.asList(clazz.clone()));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
hotspot-tools/com/sun/tools/javac/code/Scope.java:138: error: The constructor
Scope(Scope, Symbol, Object) is undefined
return new Scope(this, this.owner, this.table.clone());
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
hotspot-tools/com/sun/tools/javac/code/Scope.java:490: error: The constructor
Scope.ErrorScope(Scope.ErrorScope, Symbol, \
Object) is undefined
return new ErrorScope(this, owner, table.clone());
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
hotspot-tools/com/sun/tools/javac/jvm/Code.java:1608: error: Type mismatch:
cannot convert from Object to Type[]
state.stack = stack.clone();
There are 146 of these errors, all seem to be related to clone(). They don't
occur when using gij to run ecj, either the system copy or the one used by gcj
(from sourceware.org):
/home/andrew/build/gcj/bin/gij -cp
/home/andrew/projects/classpath/gcj/dependencies/ecj.jar
org.eclipse.jdt.internal.compiler.batch.Main -g -d lib/hotspot-tools
-source 1.5 -sourcepath
'hotspot-tools:/home/andrew/projects/openjdk/icedtea/netx:/mnt/builder/icedtea/generated:openjdk/jdk/src/share/classes:openjdk/jdk/src/solaris/classes:openjdk/langtools/src/share/classes:openjdk/jaxp/src/share/classes:openjdk/corba/src/share/classes:openjdk/jaxws/src/share/classes'
-bootclasspath \'\' @hotspot-tools-source-files.txt
... some time later...
21808 problems (21808 warnings)
Am I translating some of the arguments correctly? If I instead turn sourcepath
into -fsourcepath, it fails immediately as it is unable to locate
java.lang.Object. The same occurs if -bootclasspath \'\' is removed.
--
Summary: gcj -C has problems with clone()
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gnu_andrew at member dot fsf dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40888