diff options
Diffstat (limited to 'gcc/go')
-rw-r--r-- | gcc/go/gofrontend/MERGE | 2 | ||||
-rw-r--r-- | gcc/go/gofrontend/expressions.cc | 31 |
2 files changed, 6 insertions, 27 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index af4d052..698969f 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -68b1c7659a6b25d537a4ff3365ab070fa6215b0b +af683486b4de5503b2b6d9ae974a2ab1eeb92290 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index dc7399e..d154630 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -12802,24 +12802,11 @@ Array_index_expression::do_determine_type(const Type_context*) this->array_->determine_type_no_context(); Type_context index_context(Type::lookup_integer_type("int"), false); - if (this->start_->is_constant()) - this->start_->determine_type(&index_context); - else - this->start_->determine_type_no_context(); + this->start_->determine_type(&index_context); if (this->end_ != NULL) - { - if (this->end_->is_constant()) - this->end_->determine_type(&index_context); - else - this->end_->determine_type_no_context(); - } + this->end_->determine_type(&index_context); if (this->cap_ != NULL) - { - if (this->cap_->is_constant()) - this->cap_->determine_type(&index_context); - else - this->cap_->determine_type_no_context(); - } + this->cap_->determine_type(&index_context); } // Check types of an array index. @@ -13488,17 +13475,9 @@ String_index_expression::do_determine_type(const Type_context*) this->string_->determine_type_no_context(); Type_context index_context(Type::lookup_integer_type("int"), false); - if (this->start_->is_constant()) - this->start_->determine_type(&index_context); - else - this->start_->determine_type_no_context(); + this->start_->determine_type(&index_context); if (this->end_ != NULL) - { - if (this->end_->is_constant()) - this->end_->determine_type(&index_context); - else - this->end_->determine_type_no_context(); - } + this->end_->determine_type(&index_context); } // Check types of a string index. |