From: ian Date: Tue, 25 Aug 2015 19:42:26 +0000 (+0000) Subject: compiler: Don't crash on erroneous array types. X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d0eb27146ed478dcf722ed8e906d327bf753fc42;p=thirdparty%2Fgcc.git compiler: Don't crash on erroneous array types. Fixes golang/go#11546. Reviewed-on: https://go-review.googlesource.com/13795 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227184 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index e499d7f3c011..1bde6690e2a6 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 5418313aea25..8331678578d1 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;