verify.c (verify_jvm_instructions): Better error messages.
� * verify.c (verify_jvm_instructions): Better error messages. From-SVN: r26788
This commit is contained in:
parent
0d9d12fc95
commit
10b905f1ea
@ -750,8 +750,12 @@ verify_jvm_instructions (jcf, byte_ops, length)
|
||||
pop_type (field_type);
|
||||
if (! is_static)
|
||||
{
|
||||
int clindex = COMPONENT_REF_CLASS_INDEX (¤t_jcf->cpool,
|
||||
index);
|
||||
tree self_type = get_class_constant (current_jcf, clindex);
|
||||
/* Defer actual checking until next pass. */
|
||||
pop_type (ptr_type_node);
|
||||
if (pop_type_0 (self_type) == NULL_TREE)
|
||||
VERIFICATION_ERROR ("incorrect type for field reference");
|
||||
}
|
||||
if (! is_putting)
|
||||
push_type (field_type);
|
||||
@ -1283,6 +1287,7 @@ verify_jvm_instructions (jcf, byte_ops, length)
|
||||
message = "program counter out of range";
|
||||
goto verify_error;
|
||||
verify_error:
|
||||
error ("verification error at PC=%d: %s", oldpc, message);
|
||||
error ("verification error at PC=%d: %s", oldpc);
|
||||
error (message);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user