[Bug libgcj/23182] instanceof sometimes fails if compiled with -findirect-dispatch
Andrew Haley
aph@redhat.com
Fri Sep 9 12:56:00 GMT 2005
A line of code was incorrectly removed from pop_type_0() when the new
verifier was added, a fairly long time ago.
Andrew.
2005-09-09 Andrew Haley <aph@redhat.com>
PR libgcj/23182
* expr.c (pop_type_0): If the expected type is object or ptr
(i.e. void*), return the type of the object we just popped from
the stack.
Index: expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/expr.c,v
retrieving revision 1.235
diff -u -2 -p -r1.235 expr.c
--- expr.c 16 Aug 2005 16:06:43 -0000 1.235
+++ expr.c 9 Sep 2005 12:53:38 -0000
@@ -351,4 +351,9 @@ pop_type_0 (tree type, char **messagep)
if (TREE_CODE (type) == POINTER_TYPE && TREE_CODE (t) == POINTER_TYPE)
{
+ /* If the expected type we've been passed is object or ptr
+ (i.e. void*), the caller needs to know the real type. */
+ if (type == ptr_type_node || type == object_ptr_type_node)
+ return t;
+
/* Since the verifier has already run, we know that any
types we see will be compatible. In BC mode, this fact
More information about the Java-patches
mailing list