You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
go version go1.9 darwin/amd64
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/twmb/go"
GORACE=""
GOROOT="/Users/twmb/go/go"
GOTOOLDIR="/Users/twmb/go/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/_m/6_qc8cr574ddsc7j2ytvtcyc0000gn/T/go-build699981013=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOROOT/bin/go version: go version go1.9 darwin/amd64
GOROOT/bin/go tool compile -V: compile version go1.9
uname -v: Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64
ProductName: Mac OS X
ProductVersion: 10.12.6
BuildVersion: 16G29
lldb --version: lldb-370.0.42
Swift-3.1
The text was updated successfully, but these errors were encountered:
ianlancetaylor
changed the title
Unexpected allocations when ranging over an anonymous struct containing functions
cmd/compile: unexpected escape when ranging over an anonymous struct containing functions
Aug 31, 2017
in BenchmarkB with no corresponding annotation in BenchmarkA. I believe that is the source of the allocation. I don't know why it escapes in BenchmarkB but not in BenchmarkA.
Please answer these questions before submitting your issue. Thanks!
What did you do?
https://play.golang.org/p/WzFvL4aqML
go test -bench . -benchmem
What did you expect to see?
BenchmarkB
to have 0 allocationsWhat did you see instead?
System details
The text was updated successfully, but these errors were encountered: