[Bug java/11470] New: bytecode created with gcj -C doesn't cache lookup from synthetic class$ member
jsturm at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Jul 9 05:26:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11470
Summary: bytecode created with gcj -C doesn't cache lookup from
synthetic class$ member
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jsturm at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: all
GCC host triplet: all
GCC target triplet: all
Given the following source file:
class A {
Class a() {
return A.class;
}
}
gcj generates the following bytecode:
0: ldc #31=<String "A">
2: invokestatic #33=<Method A.class$ (java.lang.String)java.lang.Class>
5: areturn
whereas other java compilers (e.g. jikes) generate similar to:
0: getstatic #13=<Field A.class$A java.lang.Class>
3: dup
4: ifnonnull 18
7: pop
8: ldc #14=<String "[LA;">
10: iconst_0
11: invokestatic #19=<Method A.class$ (java.lang.String,boolean)java.lang.Class
14: dup
15: putstatic #13=<Field A.class$A java.lang.Class>
18: areturn
Note the A.class$A synthetic field which is absent from gcj output.
The lossage is particularly noticable in libjava.lang/SyncTest.java.
More information about the Gcc-bugs
mailing list