This is the mail archive of the
java-prs@gcc.gnu.org
mailing list for the Java project.
[Bug libgcj/23182] instanceof sometimes fails if compiled with -findirect-dispatch
- From: "aph at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: java-prs at gcc dot gnu dot org
- Date: 8 Sep 2005 14:09:16 -0000
- Subject: [Bug libgcj/23182] instanceof sometimes fails if compiled with -findirect-dispatch
- References: <20050801155040.23182.hannes@helma.at>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From aph at gcc dot gnu dot org 2005-09-08 14:09 -------
I found the cause of this bug. A line of code was incorrectly removed from
pop_type_0() when the new verifier was added, a fairly long time ago. This
patch should fix it.
Index: expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/expr.c,v
retrieving revision 1.235
diff -u -2 -c -r1.235 expr.c
cvs diff: conflicting specifications of output style
*** expr.c 16 Aug 2005 16:06:43 -0000 1.235
--- expr.c 8 Sep 2005 14:08:53 -0000
***************
*** 351,354 ****
--- 351,357 ----
if (TREE_CODE (type) == POINTER_TYPE && TREE_CODE (t) == POINTER_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
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23182