compiler: avoid orphaning Bexpressions when processing conversions
authorIan Lance Taylor <ian@gcc.gnu.org>
Mon, 12 Jun 2017 17:51:52 +0000 (17:51 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Mon, 12 Jun 2017 17:51:52 +0000 (17:51 +0000)
commit20d5c8731f4bc1aa72ced6cf61016407b74109d5
tree65218f1f3dbd2484a4cafa7fafda0b3ed2155fb7
parent754d67d5ba4a1f9994210d402893a4cf49ce6a71
compiler: avoid orphaning Bexpressions when processing conversions

    The method Type_conversion_expression::do_get_backend was (in some
    circumstances) creating a Bexpression for the source expression of the
    conversion and then throwing it away before using it. Fix up this
    method to insure that the call to get_backend() on the source
    expression is only made when the result will be used.

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

From-SVN: r249131
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/expressions.cc