From 0cba839e42ca0342306ccfff41713b19b8b9087b Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 24 Feb 2011 15:18:35 +0000 Subject: [PATCH] Traverse erroneous send/receive statements. From-SVN: r170473 --- gcc/go/gofrontend/parse.cc | 6 ++++++ 1 file changed, 6 insertions(+) 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) ) ) ":" . -- 2.30.2