compiler: Accept untyped integral values as string/array indices.
commitf77aa642e2989a07a604c1752ed3e627748f3161
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 29 Sep 2015 22:27:53 +0000 (29 22:27 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 29 Sep 2015 22:27:53 +0000 (29 22:27 +0000)
treebe482fe03750db0319b2dd4ca21fd62cdae003d3
parent7a833a099d943e6010469df91376fea53577506b
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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228270 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/expressions.cc