diff options
author | Andrew Haley <aph@redhat.com> | 2005-09-09 16:04:11 +0000 |
---|---|---|
committer | Andrew Haley <aph@gcc.gnu.org> | 2005-09-09 16:04:11 +0000 |
commit | 8f0960834317f5a64a9246b0321b5f90f9faaf05 (patch) | |
tree | 6fd2fb5055153c98b6d6dc6750a93ed970f7081a /gcc/java/expr.c | |
parent | 70e9e3d60c55f89df8887ea9d0db0dc1aa0d4dcf (diff) | |
download | gcc-8f0960834317f5a64a9246b0321b5f90f9faaf05.zip gcc-8f0960834317f5a64a9246b0321b5f90f9faaf05.tar.gz gcc-8f0960834317f5a64a9246b0321b5f90f9faaf05.tar.bz2 |
re PR libgcj/23182 (instanceof sometimes fails if compiled with -findirect-dispatch)
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.
From-SVN: r104098
Diffstat (limited to 'gcc/java/expr.c')
-rw-r--r-- | gcc/java/expr.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/java/expr.c b/gcc/java/expr.c index d65a6ff..8aa49ad 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -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 |