compiler: fix double evaluation with interface field expression
commit9189e53b5fa32e8a828946b4ee2e27e7769c4942
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 10 Jul 2018 00:55:28 +0000 (10 00:55 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 10 Jul 2018 00:55:28 +0000 (10 00:55 +0000)
tree26c3014d414d02aa217dd23af1afbe63837aa7f7
parent00e1a2507880982908c5001933443e73b8eb2a4d
compiler: fix double evaluation with interface field expression

    In Interface_field_reference_expression, the interface expression
    is used in two places, so a temporary variable is used. Previously,
    we used a Set_and_use_temporary_expression, which, when evaluated
    twice, causes double evaluation of the underlying expression. Fix
    by setting the temporary once and use Temporary_reference_expression
    instead.

    Fixes golang/go#26248.

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

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