]> Cypherpunks repositories - gostls13.git/commit
cmd/gc: record &x[0] as taking address of x, if x is an array
authorRuss Cox <rsc@golang.org>
Sun, 16 Feb 2014 01:01:15 +0000 (20:01 -0500)
committerRuss Cox <rsc@golang.org>
Sun, 16 Feb 2014 01:01:15 +0000 (20:01 -0500)
commit1a3ee6794c007c0a6c9481cdb26ed50e93f2697d
tree2c837125009ef7a85261e1986bb4a21a5cf08dd3
parent8b6ef69e239ac9abbb187915dbd345c0406435ec
cmd/gc: record &x[0] as taking address of x, if x is an array

Not recording the address being taken was causing
the liveness analysis not to preserve x in the absence
of direct references to x, which in turn was making the
net test fail with GOGC=0.

In addition to the test, this fixes a bug wherein
        GOGC=0 go test -short net
crashed if liveness analysis was in use (like at tip, not like Go 1.2).

TBR=ken2
CC=golang-codereviews
https://golang.org/cl/64470043
src/cmd/gc/go.h
src/cmd/gc/typecheck.c
src/cmd/gc/walk.c
test/fixedbugs/bug483.go [new file with mode: 0644]