summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2000-04-23 01:26:51 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2000-04-23 01:26:51 +0000
commiteccca0e0c67406ff5a86d5169708b309e6b37ab2 (patch)
treee65a3a7cf72dad61f55620f174cb66946510f484
parentfdaea7a20d303496fa4dca869aeaa7c5a6fad9db (diff)
downloadgcc-eccca0e0c67406ff5a86d5169708b309e6b37ab2.tar.gz
* boehm.c (mark_reference_fields): Only call byte_position on
non-static fields. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33351 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/java/ChangeLog5
-rw-r--r--gcc/java/boehm.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 9fdc4b68550..dab029e97ca 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -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.
diff --git a/gcc/java/boehm.c b/gcc/java/boehm.c
index 237158d2fd0..1a644875eb2 100644
--- a/gcc/java/boehm.c
+++ b/gcc/java/boehm.c
@@ -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;