From: Ian Lance Taylor Date: Thu, 24 Feb 2011 15:18:35 +0000 (+0000) Subject: Traverse erroneous send/receive statements. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0cba839e42ca0342306ccfff41713b19b8b9087b;p=gcc.git Traverse erroneous send/receive statements. From-SVN: r170473 --- diff --git a/gcc/go/gofrontend/parse.cc b/gcc/go/gofrontend/parse.cc index abd75fb27a6..ab6021d0b2c 100644 --- a/gcc/go/gofrontend/parse.cc +++ b/gcc/go/gofrontend/parse.cc @@ -4203,6 +4203,12 @@ Parse::comm_clause(Select_clauses* clauses, bool* saw_default) if (got_case) clauses->add(is_send, channel, val, var, is_default, statements, location); + else if (statements != NULL) + { + // Add the statements to make sure that any names they define + // are traversed. + this->gogo_->add_block(statements, location); + } } // CommCase = ( "default" | ( "case" ( SendExpr | RecvExpr) ) ) ":" .