diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2015-08-25 19:42:26 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2015-08-25 19:42:26 +0000 |
commit | 25486c2827c7801fc475d2c54f129750006699d5 (patch) | |
tree | 77e76ae9072808ca67f544a4901ccfc7a4298f1a /gcc | |
parent | f14e01090b090777be3b78441d851f221dd13230 (diff) | |
download | gcc-25486c2827c7801fc475d2c54f129750006699d5.zip gcc-25486c2827c7801fc475d2c54f129750006699d5.tar.gz gcc-25486c2827c7801fc475d2c54f129750006699d5.tar.bz2 |
compiler: Don't crash on erroneous array types.
Fixes golang/go#11546.
Reviewed-on: https://go-review.googlesource.com/13795
From-SVN: r227184
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/go/gofrontend/MERGE | 2 | ||||
-rw-r--r-- | gcc/go/gofrontend/types.cc | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index e499d7f..1bde669 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -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. diff --git a/gcc/go/gofrontend/types.cc b/gcc/go/gofrontend/types.cc index 5418313..8331678 100644 --- a/gcc/go/gofrontend/types.cc +++ b/gcc/go/gofrontend/types.cc @@ -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; |