Skip to content

Commit 20886e7

Browse files
author
Ian Lance Taylor
committed
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
1 parent 0358f01 commit 20886e7

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

gcc/go/gofrontend/MERGE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
5c49a77455f52ba2c7eddb5b831456dc1c67b02f
1+
b4a932b4a51b612cadcec93a83f94d6ee7d7d190
22

33
The first line of this file holds the git revision number of the last
44
merge done from the gofrontend repository.

gcc/go/gofrontend/expressions.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3955,6 +3955,8 @@ Unary_expression::do_check_types(Gogo*)
39553955
// Indirecting through a pointer.
39563956
if (type->points_to() == NULL)
39573957
this->report_error(_("expected pointer"));
3958+
if (type->points_to()->is_error())
3959+
this->set_is_error();
39583960
break;
39593961

39603962
default:

0 commit comments

Comments
 (0)