diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-02-07 02:27:10 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-02-07 02:27:10 +0000 |
commit | 434f18a9dac1041b7f31ee5f55943de818e96d91 (patch) | |
tree | 6c48c98f3752277d3f96825e9e3cbe7f9a40595a /libjava/verify.cc | |
parent | db4c0bc2dc6d6daf0ed89f4e2178972aeb30411c (diff) |
* verify.cc (require_array_type): If argument is a null array of
references, return null as the element type.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49561 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/verify.cc')
-rw-r--r-- | libjava/verify.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libjava/verify.cc b/libjava/verify.cc index 8d235e7d3da..562cfaf5bc3 100644 --- a/libjava/verify.cc +++ b/libjava/verify.cc @@ -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"); |