boehm.c (mark_reference_fields): Only call byte_position on non-static fields.
authorTom Tromey <tromey@cygnus.com>
Sun, 23 Apr 2000 01:26:51 +0000 (01:26 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Sun, 23 Apr 2000 01:26:51 +0000 (01:26 +0000)
* boehm.c (mark_reference_fields): Only call byte_position on
non-static fields.

From-SVN: r33351

gcc/java/ChangeLog
gcc/java/boehm.c

index 9fdc4b6..dab029e 100644 (file)
@@ -1,5 +1,10 @@
 2000-04-22  Tom Tromey  <tromey@cygnus.com>
 
+       * boehm.c (mark_reference_fields): Only call byte_position on
+       non-static fields.
+
+2000-04-22  Tom Tromey  <tromey@cygnus.com>
+
        * boehm.c (mark_reference_fields): Added `last_view_index'
        argument.  Use DECL_FIELD_OFFSET to determine field's offset.
 
index 237158d..1a64487 100644 (file)
@@ -94,11 +94,12 @@ mark_reference_fields (field, low, high, ubit,
 
   for (; field != NULL_TREE; field = TREE_CHAIN (field))
     {
-      HOST_WIDE_INT offset = tree_low_cst (byte_position (field), 1);
+      HOST_WIDE_INT offset;
 
       if (FIELD_STATIC (field))
        continue;
 
+      offset = tree_low_cst (byte_position (field), 1);
       if (JREFERENCE_TYPE_P (TREE_TYPE (field)))
        {
          unsigned int count;