verify.cc (require_array_type): If argument is a null array of references, return...
authorTom Tromey <tromey@redhat.com>
Thu, 7 Feb 2002 02:27:10 +0000 (02:27 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Thu, 7 Feb 2002 02:27:10 +0000 (02:27 +0000)
* verify.cc (require_array_type): If argument is a null array of
references, return null as the element type.

From-SVN: r49561

libjava/ChangeLog
libjava/verify.cc

index 3a47cc0683ccc34c5ddfb7403db9cf3bfe6986c0..bbf6942467ff2aab7b7f10749777d28761df6736 100644 (file)
@@ -1,3 +1,8 @@
+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.
+
 2002-02-06  Mark Wielaard  <mark@klomp.org>
 
        * verify.cc (verify_instructions_0) [op_dup2]: Actually push the
index 8d235e7d3da3268dd553753d8f051700d837ef27..562cfaf5bc3d7bb2c9b1f0b11baa999a0abf6e10 100644 (file)
@@ -1166,9 +1166,11 @@ private:
   // 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");