aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/java/expr.c')
-rw-r--r--gcc/java/expr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index fe77668..53aa45b 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -1523,8 +1523,9 @@ 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);
+ tree address;
field_offset = fold (convert (sizetype, field_offset));
- tree address
+ address
= fold (build (PLUS_EXPR,
build_pointer_type (TREE_TYPE (field_decl)),
self_value, field_offset));