compiler: in range, evaluate array if it has receives or calls
commit4714afb2bca6e37101f642bcd4cda4b808712d65
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 5 Feb 2018 01:50:22 +0000 (5 01:50 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 5 Feb 2018 01:50:22 +0000 (5 01:50 +0000)
treeb28da004d38101795417db74c7864f081e38ba3f
parenta065edc5a6e40a93ce4c9f30b13ac018e2a8647f
compiler: in range, evaluate array if it has receives or calls

    The last change was incomplete, in that it did not evaluate the array
    argument in some cases where it had to be evaluated.  This reuses the
    existing code for checking whether len/cap is constant.

    Also clean up the use of _ as the second variable in a for/range,
    which was previously inconsistent depending on whether the statement
    used = or :=.

    Updates golang/go#22313

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

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