compiler: do not propagate address-taken of a slice element to the slice
authorIan Lance Taylor <ian@gcc.gnu.org>
Fri, 22 Dec 2017 16:43:28 +0000 (16:43 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Fri, 22 Dec 2017 16:43:28 +0000 (16:43 +0000)
commitd7b24d5556b2dae71e1ed3c907d33db21cd2ce72
tree6aafaec025a855ec9fa8bb9a0cce3a4fa9dcbb14
parentbb14e19c2be54dd10f40d705364e08524ec8310c
compiler: do not propagate address-taken of a slice element to the slice

    Array_index_expression may be used for indexing/slicing array or
    slice. If a slice element is address taken, the slice itself is
    not necessarily address taken. Only propagate address-taken for
    arrays.

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

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