diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2015-07-23 19:33:26 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2015-07-23 19:33:26 +0000 |
commit | 20886e7134bbf98b5cd087e296b581f8e1a42d95 (patch) | |
tree | 84e18f6352c2971baeba4222229e8e47cdb13a8e /gcc | |
parent | 0358f01b2e655e30650b6c9583885adee7869e8a (diff) | |
download | gcc-20886e7134bbf98b5cd087e296b581f8e1a42d95.zip gcc-20886e7134bbf98b5cd087e296b581f8e1a42d95.tar.gz gcc-20886e7134bbf98b5cd087e296b581f8e1a42d95.tar.bz2 |
compiler: Check for errors in the underlying types of unary expressions.
Fixes golang/go#11592.
Reviewed-on: https://go-review.googlesource.com/12044
From-SVN: r226122
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/go/gofrontend/MERGE | 2 | ||||
-rw-r--r-- | gcc/go/gofrontend/expressions.cc | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 463b203..f189ed8 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -5c49a77455f52ba2c7eddb5b831456dc1c67b02f +b4a932b4a51b612cadcec93a83f94d6ee7d7d190 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/expressions.cc b/gcc/go/gofrontend/expressions.cc index 2351129..065be33 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -3955,6 +3955,8 @@ Unary_expression::do_check_types(Gogo*) // Indirecting through a pointer. if (type->points_to() == NULL) this->report_error(_("expected pointer")); + if (type->points_to()->is_error()) + this->set_is_error(); break; default: |