gcj/253: problems with instanceof when compilation from .class files

Bryce McKinlay bryce@albatross.co.nz
Tue Jun 6 23:20:00 GMT 2000


The following reply was made to PR gcj/253; it has been noted by GNATS.

From: Bryce McKinlay <bryce@albatross.co.nz>
To: warnes@biostat.washington.edu
Cc: java-gnats@sourceware.cygnus.com
Subject: Re: gcj/253: problems with instanceof when compilation from .class files
Date: Wed, 07 Jun 2000 18:22:42 +1200

 warnes@biostat.washington.edu wrote:
 
 > A instanceof B incorrectly returns false when B is an interface and A implements the interface.
 > This only seems to occur when 1) gcj was invoked on the .class files and 2) the class is passed to a function as a parameter of type B.
 
 The compiler is never calling _Jv_IsInstanceOf. This appears to be a recent regression, probibly related to this patch:
 
 2000-05-19  Tom Tromey  <tromey@cygnus.com>
 
  * java-tree.h (build_instanceof): Declare.
  (build_get_class): Declare.
  * parse.y (patch_binop): Use build_instanceof.
  * expr.c (build_instanceof): New function.  If class is final,
  don't make a function call.
  (expand_java_INSTANCEOF): Use it.
  (build_get_class): New function.
 
 BTW, Tom: I am also seeing a problem with "instanceof" on an array type (only when compiling from bytecode), causing a "FAIL 25" from testsuite/libjava.lang/InterfaceDispatch.java
 
   [ bryce ]
 
 


More information about the Java-prs mailing list