aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/expr.c
diff options
context:
space:
mode:
authorBryce McKinlay <bryce@gcc.gnu.org>2005-03-07 21:10:49 +0000
committerBryce McKinlay <bryce@gcc.gnu.org>2005-03-07 21:10:49 +0000
commita2da2c9a68c574b4598768ff414d8b19ccc34f3c (patch)
tree9d0e7f2e3d8eea9278d7553dc439c5ea0969d3da /gcc/java/expr.c
parentc80d391c3e2fba4f444d759d146e5ef6e5326613 (diff)
downloadgcc-a2da2c9a68c574b4598768ff414d8b19ccc34f3c.zip
gcc-a2da2c9a68c574b4598768ff414d8b19ccc34f3c.tar.gz
gcc-a2da2c9a68c574b4598768ff414d8b19ccc34f3c.tar.bz2
[multiple changes]
2005-03-04 Bryce McKinlay <mckinlay@redhat.com> * verify-glue.c (vfy_is_assignable_from): Perform static check using can_widen_reference_to if the C++ ABI is in use. (vfy_get_interface_count, vfy_get_interface): Remove unused functions. * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type, type_isresolved, init_state, set_pc, state_get_pc, _Jv_BytecodeVerifier): Clean up unused and disabled functions. (verify_fail): Report the current PC from the verifier context. (free_state): Remove #if 0 block to enable this function. (free_verifier_context): Call free_state on state_list iterator values before freeing them. * expr.c (pop_type_0): Pop correct type for error message when stack contains a multi-word type. 2005-03-04 Ranjit Mathew <rmathew@hotmail.com> * expr.c (build_java_array_length_access): Remove !flag_new_verifier for known NULL array length access. From-SVN: r96044
Diffstat (limited to 'gcc/java/expr.c')
-rw-r--r--gcc/java/expr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index 2c517a1..eaf5fd0 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -383,6 +383,10 @@ pop_type_0 (tree type, char **messagep)
fail:
{
char *temp = xstrdup (lang_printable_name (type, 0));
+ /* If the stack contains a multi-word type, keep popping the stack until
+ the real type is found. */
+ while (t == void_type_node)
+ t = stack_type_map[--stack_pointer];
*messagep = concat ("expected type '", temp,
"' but stack contains '", lang_printable_name (t, 0),
"'", NULL);
@@ -818,7 +822,7 @@ build_java_array_length_access (tree node)
throws a NullPointerException. The only way we could get a node
of type ptr_type_node at this point is `aconst_null; arraylength'
or something equivalent. */
- if (!flag_new_verifier && type == ptr_type_node)
+ if (type == ptr_type_node)
return build3 (CALL_EXPR, int_type_node,
build_address_of (soft_nullpointer_node),
NULL_TREE, NULL_TREE);