aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/check-init.c
diff options
context:
space:
mode:
authorBryce McKinlay <bryce@gcc.gnu.org>2002-02-28 11:40:29 +0000
committerBryce McKinlay <bryce@gcc.gnu.org>2002-02-28 11:40:29 +0000
commit022dcc46051ffd0114ac3382cc7e50928f17d995 (patch)
tree6daf1252f43021f81274da35d2f5f16541eaedb2 /gcc/java/check-init.c
parent70da1d030dfa76bd605100e3969df62b6aaa2512 (diff)
downloadgcc-022dcc46051ffd0114ac3382cc7e50928f17d995.zip
gcc-022dcc46051ffd0114ac3382cc7e50928f17d995.tar.gz
gcc-022dcc46051ffd0114ac3382cc7e50928f17d995.tar.bz2
expr.c (java_array_data_offset): Removed function.
* expr.c (java_array_data_offset): Removed function. (JAVA_ARRAY_LENGTH_OFFSET): Removed macro. (build_java_array_length_access): Obtain "length" value using a COMPONENT_REF, instead of INDIRECT_REF and arithmetic. (build_java_arrayaccess): Correct comment. Access "data" using a COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF. (build_java_arraystore_check): New function. (expand_java_arraystore): Use build_java_arraystore_check. * parse.y (patch_assignment): Simplify code to insert a store check when lvalue is an ARRAY_REF. Use build_java_arraystore_check. * check-init.c (check_init): Update to reflect that an array length access is now a COMPONENT_REF. * gcj.texi (Code Generation): Improve documentation of -fno-bounds-check. Add documentation for -fno-store-check. * java-tree.h (flag_store_check): Declare. (build_java_arraystore_check): Declare. * lang.c (flag_store_check): Initialize to 1. (lang_f_options): Add store-check option. * jvspec.c: Don't pass store-check option to jvgenmain. * lang-options.h: Add help string for -fno-store-check. From-SVN: r50129
Diffstat (limited to 'gcc/java/check-init.c')
-rw-r--r--gcc/java/check-init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/java/check-init.c b/gcc/java/check-init.c
index 2a4e3c3..6793533 100644
--- a/gcc/java/check-init.c
+++ b/gcc/java/check-init.c
@@ -558,7 +558,7 @@ check_init (exp, before)
final_assign_error (DECL_NAME (decl));
break;
}
- else if (TREE_CODE (tmp) == INDIRECT_REF && IS_ARRAY_LENGTH_ACCESS (tmp))
+ else if (TREE_CODE (tmp) == COMPONENT_REF && IS_ARRAY_LENGTH_ACCESS (tmp))
{
/* We can't emit a more specific message here, because when
compiling to bytecodes we don't get here. */