diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index 550d1aea0ab..a11e3d6fa17 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -9541,7 +9541,7 @@ String_index_expression::do_type() if (this->end_ == NULL) return Type::lookup_integer_type("uint8"); else - return Type::make_string_type(); + return this->string_->type(); } // Determine the type of a string index.