aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/java/ChangeLog5
-rw-r--r--gcc/java/expr.c14
2 files changed, 12 insertions, 7 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 53698cfe5d0..f781f10c9c6 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,8 @@
+2004-11-09 Tom Tromey <tromey@redhat.com>
+
+ * expr.c (build_java_arraystore_check): Still generate check if
+ element type is itself an array.
+
2004-11-08 Tom Tromey <tromey@redhat.com>
* java-tree.h (soft_check_assignment_node): Removed.
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index 50c740744e0..721b1efd2ed 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -969,14 +969,14 @@ build_java_arraystore_check (tree array, tree object)
if (!flag_store_check)
return build1 (NOP_EXPR, array_type_p, array);
- /* No check is needed if the element type is final or is itself an array.
- Also check that element_type matches object_type, since in the bytecode
- compilation case element_type may be the actual element type of the array
- rather than its declared type. However, if we're doing indirect
- dispatch, we can't do the `final' optimization. */
+ /* No check is needed if the element type is final. Also check that
+ element_type matches object_type, since in the bytecode
+ compilation case element_type may be the actual element type of
+ the array rather than its declared type. However, if we're doing
+ indirect dispatch, we can't do the `final' optimization. */
if (element_type == object_type
- && (TYPE_ARRAY_P (TREE_TYPE (element_type))
- || (! flag_indirect_dispatch && CLASS_FINAL (element_type))))
+ && ! flag_indirect_dispatch
+ && CLASS_FINAL (element_type))
return build1 (NOP_EXPR, array_type_p, array);
/* OBJECT might be wrapped by a SAVE_EXPR. */