What version of Go are you using (go version)?
$ go version
go version go1.16 darwin/amd64
Does this issue reproduce with the latest release?
Yes. I've git bisect the error to commit f2c0c2b
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/tonyghita/Library/Caches/go-build"
GOENV="/Users/tonyghita/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/tonyghita/go/pkg/mod"
GONOPROXY="*"
GONOSUMDB="*"
GOOS="darwin"
GOPATH="/Users/tonyghita/go"
GOPRIVATE="*"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/Users/tonyghita/sdk/go1.16"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/Users/tonyghita/sdk/go1.16/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.16"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/tonyghita/go/src/github.com/tonyghita/repro/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/gv/vdmq3_l541b_0lq_ds37xslnzgdpkw/T/go-build3906706978=/tmp/go-build -gno-record-gcc-switches -fno-common"
What did you do?
I made a small reproducer repository to demonstrate the issue https://github.com/tonyghita/repro and run go test against it.
What did you expect to see?
Test pass without issue, as in Go 1.15.
What did you see instead?
# github.com/tonyghita/repro_test [github.com/tonyghita/repro.test]
./repro_test.go:10:13: internal compiler error: 'TestF.func1': Value live at entry. It shouldn't be. func TestF.func1, node ~R0, value v19
What version of Go are you using (
go version)?Does this issue reproduce with the latest release?
Yes. I've
git bisectthe error to commit f2c0c2bWhat operating system and processor architecture are you using (
go env)?go envOutputWhat did you do?
I made a small reproducer repository to demonstrate the issue https://github.com/tonyghita/repro and run
go testagainst it.What did you expect to see?
Test pass without issue, as in Go 1.15.
What did you see instead?