aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/expr.c
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>2001-12-04 11:30:13 -0800
committerPer Bothner <bothner@gcc.gnu.org>2001-12-04 11:30:13 -0800
commit4f88ccda2d6bba5651d3203aa88f88651b6e7ed2 (patch)
tree82756fc6205d2820616c3ac0ac02c08fdafcd100 /gcc/java/expr.c
parentff524991302f07788509c6d81b505bf45f94260e (diff)
downloadgcc-4f88ccda2d6bba5651d3203aa88f88651b6e7ed2.zip
gcc-4f88ccda2d6bba5651d3203aa88f88651b6e7ed2.tar.gz
gcc-4f88ccda2d6bba5651d3203aa88f88651b6e7ed2.tar.bz2
check-init.c: Handle definite unassignment to finals in addition to definite assignment.
* check-init.c: Handle definite unassignment to finals in addition to definite assignment. [see ChangeLog] From-SVN: r47619
Diffstat (limited to 'gcc/java/expr.c')
-rw-r--r--gcc/java/expr.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index ef347d6..78ca165 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -706,10 +706,12 @@ build_java_array_length_access (node)
length = java_array_type_length (type);
if (length >= 0)
return build_int_2 (length, 0);
- return fold (build1 (INDIRECT_REF, int_type_node,
- fold (build (PLUS_EXPR, ptr_type_node,
- java_check_reference (node, 1),
- JAVA_ARRAY_LENGTH_OFFSET(node)))));
+ node = build1 (INDIRECT_REF, int_type_node,
+ fold (build (PLUS_EXPR, ptr_type_node,
+ java_check_reference (node, 1),
+ JAVA_ARRAY_LENGTH_OFFSET(node))));
+ IS_ARRAY_LENGTH_ACCESS (node) = 1;
+ return fold (node);
}
/* Optionally checks a reference against the NULL pointer. ARG1: the