go/src/cmd
Cherry Mui 1c77137d4f cmd/compile: do not use special literal assignment if LHS is address-taken
A composite literal assignment

x = T{field: v}

may be compiled to

x = T{}
x.field = v

We already do not use this form is RHS uses LHS. If LHS is
address-taken, RHS may uses LHS implicitly, e.g.

v = &x.field
x = T{field: *v}

The lowering above would change the value of RHS (*v).

Fixes #52953.

Change-Id: I3f798e00598aaa550b8c17182c7472fef440d483
Reviewed-on: https://go-review.googlesource.com/c/go/+/407014
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2022-05-18 18:24:59 +00:00
..
addr2line all: gofmt main repo 2022-04-11 16:34:30 +00:00
api all: REVERSE MERGE dev.boringcrypto (cdcb4b6) into master 2022-05-02 22:12:49 -04:00
asm all: fix spelling 2022-05-17 21:46:33 +00:00
buildid all: gofmt main repo 2022-04-11 16:34:30 +00:00
cgo all: fix spelling 2022-05-17 21:46:33 +00:00
compile cmd/compile: do not use special literal assignment if LHS is address-taken 2022-05-18 18:24:59 +00:00
cover all: use os/exec instead of internal/execabs 2022-05-02 17:49:12 +00:00
dist cmd/link: fix handling of visibility hidden symbols 2022-05-06 17:37:38 +00:00
doc all: use os/exec instead of internal/execabs 2022-05-02 17:49:12 +00:00
fix all: use os/exec instead of internal/execabs 2022-05-02 17:49:12 +00:00
go all: fix spelling 2022-05-18 00:47:29 +00:00
gofmt go/printer: align expression list elements containing tabs 2022-05-10 19:22:49 +00:00
internal all: fix spelling 2022-05-18 00:47:29 +00:00
link all: fix spelling 2022-05-17 21:46:33 +00:00
nm cmd/nm, cmd/objdump, cmd/pprof: disassembly is not supported on loong64 2022-05-17 18:19:34 +00:00
objdump all: fix spelling 2022-05-17 19:51:29 +00:00
pack all: gofmt main repo 2022-04-11 16:34:30 +00:00
pprof cmd/nm, cmd/objdump, cmd/pprof: disassembly is not supported on loong64 2022-05-17 18:19:34 +00:00
test2json all: use os/exec instead of internal/execabs 2022-05-02 17:49:12 +00:00
trace runtime: add CPU samples to execution trace 2022-05-03 20:49:46 +00:00
vendor vendor: revert stray edit from CL 406835 2022-05-17 20:59:58 +00:00
vet all: gofmt main repo 2022-04-11 16:34:30 +00:00
README.vendor
go.mod cmd/pprof: update vendored github.com/google/pprof 2022-05-17 14:39:18 +00:00
go.sum cmd/pprof: update vendored github.com/google/pprof 2022-05-17 14:39:18 +00:00

README.vendor

See src/README.vendor for information on loading vendored packages
and updating the vendor directory.