From 1c4a5fc8caa525a85b92e737d86275a857fa2874 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 15 Feb 2011 19:06:34 +0000 Subject: [PATCH] Don't let array indexes be untyped. From-SVN: r170193 --- gcc/go/gofrontend/expressions.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index 96636c1b233..940d418bcaf 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -9225,10 +9225,9 @@ void Array_index_expression::do_determine_type(const Type_context*) { this->array_->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 an array index. -- 2.30.2