compiler: Accept untyped integral values as string/array indices.
authorIan Lance Taylor <ian@gcc.gnu.org>
Tue, 29 Sep 2015 22:27:53 +0000 (22:27 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Tue, 29 Sep 2015 22:27:53 +0000 (22:27 +0000)
commit3734a25644d2f7ea652303f4268de9e52e4a5a64
treebe482fe03750db0319b2dd4ca21fd62cdae003d3
parent01bdcc80e25866fcd982075617f62a53c18659a3
compiler: Accept untyped integral values as string/array indices.

    When determining the type of an index for a string/array indexing
    expression, the gofrontend would disallow floating-point and complex
    values even if they were integral and throw an internal error.  This
    patch changes gofrontend to use an integral type context when
    determining the types of a string/array index.

    Fixes golang/go#11545.

    Reviewed-on: https://go-review.googlesource.com/13796

From-SVN: r228270
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/expressions.cc