mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-18 12:09:46 +08:00
verify.cc (require_array_type): If argument is a null array of references, return null as the element type.
* verify.cc (require_array_type): If argument is a null array of references, return null as the element type. From-SVN: r49561
This commit is contained in:
parent
edd1967d0c
commit
383aa2ef49
@ -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
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user