OSDN Git Service

Traverse erroneous send/receive statements.
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 24 Feb 2011 15:18:35 +0000 (15:18 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 24 Feb 2011 15:18:35 +0000 (15:18 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170473 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/go/gofrontend/parse.cc

index abd75fb..ab6021d 100644 (file)
@@ -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) ) ) ":" .