User account creation filtered due to spam.

Bug 40888 - gcj -C has problems with clone()
Summary: gcj -C has problems with clone()
Alias: None
Product: gcc
Classification: Unclassified
Component: java (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
Depends on:
Reported: 2009-07-28 11:51 UTC by Andrew John Hughes
Modified: 2016-09-30 22:49 UTC (History)
2 users (show)

See Also:
Known to work:
Known to fail:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Andrew John Hughes 2009-07-28 11:51:55 UTC
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/ error: The constructor JNarrowedClass(JClass, List<Object>) is \
        return new JNarrowedClass(this,Arrays.asList(clazz.clone()));
hotspot-tools/com/sun/tools/javac/code/ 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/ 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/ 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

/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.
Comment 1 Andrew Pinski 2016-09-30 22:49:32 UTC
Closing as won't fix as the Java front-end has been removed from the trunk.