compiler: lower expression types in lowering pass
authorIan Lance Taylor <ian@gcc.gnu.org>
Wed, 31 Jan 2018 18:35:58 +0000 (18:35 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Wed, 31 Jan 2018 18:35:58 +0000 (18:35 +0000)
commit3008f0ffe9c36c60b5f08710daecb1832197c69f
treee072e4b47427a16a75f2c2ade64df7464c0bacff
parent9734500e9b7e9303e1d8bd4785cca4a82d9656af
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

From-SVN: r257250
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/expressions.cc
gcc/go/gofrontend/gogo.cc
gcc/go/gofrontend/gogo.h