diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index dda00329d065dc814cb209361ddae25e7e288505..d184a431a55bdcc03352a579a40d9c619e4eb8df 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -a4bcd319d98ddc52b3e7d16ec87d92aad868ab05 +302d8abbc499e28088d758ae8b2c024d8e50b9b3 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 80f8b4cbb273121d937e77788d477318fb94536d..20ca10b05243cf69e0a64a4ba07bb96e8a352952 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -5601,7 +5601,9 @@ Binary_expression::do_check_types(Gogo*) if (left_type->integer_type() == NULL) this->report_error(_("shift of non-integer operand")); - if (!right_type->is_abstract() + if (right_type->is_string_type()) + this->report_error(_("shift count not unsigned integer")); + else if (!right_type->is_abstract() && (right_type->integer_type() == NULL || !right_type->integer_type()->is_unsigned())) this->report_error(_("shift count not unsigned integer"));