This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug java/11470] New: bytecode created with gcj -C doesn't cache lookup from synthetic class$ member
- From: "jsturm at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Jul 2003 05:26:31 -0000
- Subject: [Bug java/11470] New: bytecode created with gcj -C doesn't cache lookup from synthetic class$ member
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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.