compiler: lower expression types in lowering pass
commit4b2ab53694a5568e8d9cf744e65f69e2d384a39b
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 31 Jan 2018 18:35:58 +0000 (31 18:35 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 31 Jan 2018 18:35:58 +0000 (31 18:35 +0000)
treee072e4b47427a16a75f2c2ade64df7464c0bacff
parentf468b6ad292f55ac172ffb6c8b2ccca47510f2ab
compiler: lower expression types in lowering pass

    Ensure that array types with complicated length expressions are
    handled correctly by lowering expression types in the lowering pass.

    This required some adjustment of constant expression types to not
    report too many errors for circular constant expressions.  We now
    record error types in the Named_constant type.  If we find the
    circularity due to lowering the Named_constant, we use that location
    for the error message; this retains the error location we used to use.

    Fixes golang/go#23545

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

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