]> Cypherpunks repositories - gostls13.git/commit
cmd/cgo: fix inappropriate array copy
authorkawakami <kawakami.ozone@gmail.com>
Sat, 22 Jun 2019 20:30:24 +0000 (05:30 +0900)
committerIan Lance Taylor <iant@golang.org>
Mon, 24 Jun 2019 19:18:34 +0000 (19:18 +0000)
commit38fc0afca6139ba2e28061712f68cbe426d238e7
tree05ba1c6ade739f95922e2dbc7eaab6d97ecb5b5a
parent4ae3835aa28d21fd9045223640b7617ca1b83dfe
cmd/cgo: fix inappropriate array copy

Ensure that during rewriting of expressions that take the address of
an array, that we properly recognize *ast.IndexExpr as an operation
to create a pointer variable and thus assign the proper addressOf
and deference operators as "&" and "*" respectively.

This fixes a regression from CL 142884.

Fixed #32579

Change-Id: I3cb78becff4f8035d66fc5536e5b52857eacaa3d
Reviewed-on: https://go-review.googlesource.com/c/go/+/183458
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
misc/cgo/test/cgo_test.go
misc/cgo/test/test.go
src/cmd/cgo/gcc.go