This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: FYI: another verifier fix
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 06 Feb 2002 19:48:08 -0700
- Subject: Patch: FYI: another verifier fix
- Reply-to: tromey at redhat dot com
I'm checking this in.
This is a refinement of an earlier patch and fixes another bug
discovered by Mark Wielaard.
Tom
2002-02-06 Tom Tromey <tromey@redhat.com>
* verify.cc (require_array_type): If argument is a null array of
references, return null as the element type.
Index: verify.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/verify.cc,v
retrieving revision 1.34
diff -u -r1.34 verify.cc
--- verify.cc 2002/02/07 01:11:32 1.34
+++ verify.cc 2002/02/07 01:31:44
@@ -1166,9 +1166,11 @@
// compatible with type ELEMENT. Returns the actual element type.
type require_array_type (type array, type element)
{
- // An odd case. Here we just pretend that everything went ok.
+ // An odd case. Here we just pretend that everything went ok. If
+ // the requested element type is some kind of reference, return
+ // the null type instead.
if (array.isnull ())
- return element;
+ return element.isreference () ? type (null_type) : element;
if (! array.isarray ())
verify_fail ("array required");