This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug java/23300] New: DECL_FIELD_OFFSET == 0 versus build_field_ref
- From: "tromey 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 Aug 2005 19:30:03 -0000
- Subject: [Bug java/23300] New: DECL_FIELD_OFFSET == 0 versus build_field_ref
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
If I copy the current cvs classpath into the libjava build directory
and try to build, I get an ICE.
The problem occurs because of this code in build_field_ref:
if (! flag_syntax_only
&& (flag_indirect_dispatch
/* DECL_FIELD_OFFSET == 0 if we have no reference for
the field, perhaps because we couldn't find the class
in which the field is defined.
FIXME: We should investigate this. */
|| DECL_FIELD_OFFSET (field_decl) == 0))
... flag_indirect_dispatch is false, but we have DECL_FIELD_OFFSET==0
for a 'this$0' field. So, we wind up using the indirect dispatch code
anyway. This causes a later crash (we build a bogus tree since the
otable is NULL).
I haven't investigated why DECL_FIELD_OFFSET can be 0 here.
--
Summary: DECL_FIELD_OFFSET == 0 versus build_field_ref
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tromey at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23300