2005-09-09 Andrew Haley <aph@redhat.com>
authoraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 9 Sep 2005 16:04:11 +0000 (16:04 +0000)
committeraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 9 Sep 2005 16:04:11 +0000 (16:04 +0000)
        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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104098 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/java/ChangeLog
gcc/java/expr.c

index 81fc913..ed96553 100644 (file)
@@ -1,3 +1,10 @@
+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.
+
 2005-09-06  Andrew Pinski  <pinskia@physics.uc.edu>
 
        * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
index d65a6ff..8aa49ad 100644 (file)
@@ -350,6 +350,11 @@ pop_type_0 (tree type, char **messagep)
     return t;
   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
         may be checked at runtime, but if that is so then we can