compiler: Don't crash on erroneous array types.
authorIan Lance Taylor <ian@gcc.gnu.org>
Tue, 25 Aug 2015 19:42:26 +0000 (19:42 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Tue, 25 Aug 2015 19:42:26 +0000 (19:42 +0000)
    Fixes golang/go#11546.

    Reviewed-on: https://go-review.googlesource.com/13795

From-SVN: r227184

gcc/go/gofrontend/MERGE
gcc/go/gofrontend/types.cc

index e499d7f3c01109861f974a4d98a2cfe6c68e9a51..1bde6690e2a6b061cde994bac664b3333dd17229 100644 (file)
@@ -1,4 +1,4 @@
-81810917af7ba19e1f9f8efc8b1989f7d6419d30
+d6d59d5927c4ea0c02468ebc6a2df431fb64595a
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
index 5418313aea25dce0601cad7c227343d6e47e96f5..8331678578d13aa921c8fa0f60d7297a37b213c4 100644 (file)
@@ -5781,6 +5781,8 @@ Array_type::verify_length()
 bool
 Array_type::do_verify()
 {
+  if (this->element_type()->is_error_type())
+    return false;
   if (!this->verify_length())
     this->length_ = Expression::make_error(this->length_->location());
   return true;