compiler: guard against implicit double pointer indirection
commita361b516906aff4254722e18b12cb58802fac04e
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 9 Sep 2017 06:01:35 +0000 (9 06:01 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 9 Sep 2017 06:01:35 +0000 (9 06:01 +0000)
treeba2149f66908b36dd5a9815a4225e7823f2120bf
parentfdfced1bb92ac640dedba41217b4395a5f822fd3
compiler: guard against implicit double pointer indirection

    The code that lowers field references can sometimes introduce a double
    pointer indirection in cases where it is not/safe appropriate. For
    example, in

            var p **struct { f int }
            p.f = 0

    the assignment LHS was being incorrectly lowered to (*(*p)).f.
    Detect this situation and issue an error.

    Fixes golang/go#21770

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

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