This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libgcj/23182] instanceof sometimes fails if compiled with -findirect-dispatch

A line of code was incorrectly removed from pop_type_0() when the new
verifier was added, a fairly long time ago.


2005-09-09  Andrew Haley  <>

	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 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]