compiler: avoid call duplication during order eval.
authorIan Lance Taylor <ian@gcc.gnu.org>
Tue, 27 Sep 2016 21:25:42 +0000 (21:25 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Tue, 27 Sep 2016 21:25:42 +0000 (21:25 +0000)
commitc7ff137489343e20405473156ed589ad791149d2
treefd11b50b0605169cf1d4f1d098f40291ef7e6100
parent437018ea2b6dc966ce40cd5dd684054126ddda6b
compiler: avoid call duplication during order eval.

    During the compiler's order_evaluations() pass, duplicate
    call statements were being created and inserted into block
    statement lists in situations where there were calls returning
    multiple arguments. These duplicates were benign in that they
    were ignored during backend code generation, however they
    did cause duplicate calls in AST dumps. Tweak the order
    evaluation code to handle this case better and avoid inserting
    these duplicates.

    Fixes golang/go#17237

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

From-SVN: r240559
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/gogo.cc