From: Ian Lance Taylor Date: Thu, 3 Mar 2011 01:17:34 +0000 (+0000) Subject: Fix type of discarded send expression. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=deed2020853b84c7bc74611ae7299cca5f2b63c8;p=gcc.git Fix type of discarded send expression. From-SVN: r170634 --- diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index ee486ffb27a..a45e7acc247 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -12321,7 +12321,10 @@ Send_expression::do_traverse(Traverse* traverse) Type* Send_expression::do_type() { - return Type::lookup_bool_type(); + if (this->is_value_discarded_) + return Type::make_void_type(); + else + return Type::lookup_bool_type(); } // Set types.