expr.c (build_field_ref): Widen field offset.
authorAndrew Haley <aph@redhat.com>
Thu, 29 Jan 2004 13:19:26 +0000 (13:19 +0000)
committerAndrew Haley <aph@gcc.gnu.org>
Thu, 29 Jan 2004 13:19:26 +0000 (13:19 +0000)
2004-01-28  Andrew Haley  <aph@redhat.com>

        * expr.c (build_field_ref): Widen field offset.

From-SVN: r76860

gcc/java/ChangeLog
gcc/java/expr.c

index c048dfa..ac40484 100644 (file)
@@ -1,3 +1,7 @@
+2004-01-28  Andrew Haley  <aph@redhat.com>
+
+       * expr.c (build_field_ref): Widen field offset.
+
 2004-01-27  Andrew Haley  <aph@redhat.com>
 
        java/13273
index 6b1c032..fe77668 100644 (file)
@@ -1523,6 +1523,7 @@ build_field_ref (tree self_value, tree self_class, tree name)
          tree field_offset = 
            build (ARRAY_REF, integer_type_node, TYPE_OTABLE_DECL (output_class), 
                   otable_index);
+         field_offset = fold (convert (sizetype, field_offset));
          tree address 
            = fold (build (PLUS_EXPR, 
                           build_pointer_type (TREE_TYPE (field_decl)),