Don't permit string index expression to have abstract types.
authorIan Lance Taylor <ian@gcc.gnu.org>
Tue, 22 Feb 2011 03:44:22 +0000 (03:44 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Tue, 22 Feb 2011 03:44:22 +0000 (03:44 +0000)
From-SVN: r170390

gcc/go/gofrontend/expressions.cc

index b58792c20650e011a690496f076687d748d874ff..6440ee1393e39ffa50fcea8277d4f0fa77994126 100644 (file)
@@ -9567,10 +9567,9 @@ void
 String_index_expression::do_determine_type(const Type_context*)
 {
   this->string_->determine_type_no_context();
-  Type_context subcontext(NULL, true);
-  this->start_->determine_type(&subcontext);
+  this->start_->determine_type_no_context();
   if (this->end_ != NULL)
-    this->end_->determine_type(&subcontext);
+    this->end_->determine_type_no_context();
 }
 
 // Check types of a string index.