compiler: Check for errors in the underlying types of unary expressions.
authorIan Lance Taylor <ian@gcc.gnu.org>
Thu, 23 Jul 2015 19:33:26 +0000 (19:33 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Thu, 23 Jul 2015 19:33:26 +0000 (19:33 +0000)
    Fixes golang/go#11592.

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

From-SVN: r226122

gcc/go/gofrontend/MERGE
gcc/go/gofrontend/expressions.cc

index 463b2036f11ccf80d3cc27bfc994b982cb436e1e..f189ed8ad92ed6b712c0696a71061730bfb009c7 100644 (file)
@@ -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.
index 23511292e5b86e5f5e1f7686dca46ecb9bb0e67a..065be33a9671f6d52cc2232f1dcfd792b208ba3a 100644 (file)
@@ -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: