compiler: fix slice/array evaluation order bug
commite32de7baeb35e1b8794c8d6596bd218d6ef39504
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 30 Oct 2016 16:48:37 +0000 (30 16:48 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 30 Oct 2016 16:48:37 +0000 (30 16:48 +0000)
treedbe8fdb330eeb1b6785b676fd16430ff6fb88892
parent41fd2d10cd89f0be0930c5bfc3138418078163ee
compiler: fix slice/array evaluation order bug

    There was a phase ordering issue in the handling of "keyed" array
    literal expressions: the lowering phase was canonicalizing the
    indices/vals before the phase that fixed evaluation order, meaning that
    the evaluation order was incorrect. The fix is to capture the orginal
    ordering and use that ordering when doing traversals (there is already
    something similar being done for struct literal expressions).

    Fixes golang/go#17640

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

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