java is creating a COMPONENT_REF node where the first operand is a RECORD_TYPE, rather than an expresion or DECL node. This is created at java/class.c:1014

              prim_class = lookup_class (get_identifier (prim_class_name));
              return build3 (COMPONENT_REF, NULL_TREE,
                             prim_class, TYPE_identifier_node, NULL_TREE);

here PRIM_CLASS is the RECORD_TYPE of the class. This usage disagrees with the requirements for a COMPONENT_REF in tree.def
        /* Value is structure or union component.
           Operand 0 is the structure or union (an expression).
           Operand 1 is the field (a node of type FIELD_DECL).
           Operand 2, if present, is the value of DECL_FIELD_OFFSET, measured
           in units of DECL_OFFSET_ALIGN / BITS_PER_UNIT.  */
        DEFTREECODE (COMPONENT_REF, "component_ref", tcc_reference, 3)

it is interfering with some cleanups I'm trying to do. What would be the best way of making java compliant? Have lookup_class return a suitable VAR_DECL node? I'm not sure where this then gets used ...

nathan
--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
[EMAIL PROTECTED]    ::     http://www.planetfall.pwp.blueyonder.co.uk

Reply via email to