From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21980 invoked by alias); 8 Sep 2005 14:09:35 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 21762 invoked by uid 48); 8 Sep 2005 14:09:16 -0000 Date: Thu, 08 Sep 2005 14:09:00 -0000 Message-ID: <20050908140916.21761.qmail@sourceware.org> From: "aph at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050801155040.23182.hannes@helma.at> References: <20050801155040.23182.hannes@helma.at> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug libgcj/23182] instanceof sometimes fails if compiled with -findirect-dispatch X-Bugzilla-Reason: CC X-SW-Source: 2005-09/txt/msg00950.txt.bz2 List-Id: ------- 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