Go version
go version go1.27rc2 linux/amd64
Output of go env in your module/workspace:
AR='ar'
CC='gcc'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='g++'
GCCGO='gccgo'
GO111MODULE='on'
GOAMD64='v1'
GOARCH='amd64'
GOAUTH='netrc'
GOBIN='/home/andrew/go/bin'
GOCACHE='/home/andrew/.cache/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/home/andrew/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build1604793997=/tmp/go-build -gno-record-gcc-switches'
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMOD='/home/andrew/GoProjects/compiler_bugs/simd/go.mod'
GOMODCACHE='/home/andrew/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPACKAGESDRIVER=''
GOPATH='/home/andrew/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/home/andrew/go/go1.27rc2'
GOSUMDB='sum.golang.org'
GOTELEMETRY='on'
GOTELEMETRYDIR='/home/andrew/.config/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/home/andrew/go/go1.27rc2/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.27rc2'
GOWORK=''
PKG_CONFIG='pkg-config'
What did you do?
$ cat main.go
//go:build go1.27 && goexperiment.simd
package main
import "simd"
type T struct{}
func (T) f() {
simd.BroadcastFloat32s(42)
}
func main() {}
What did you see happen?
$ GOEXPERIMENT=simd go build main.go
./main.go:9:6: internal compiler error: missing Types entry: f@simd0
What did you expect to see?
expected no error (build succeeded)
This also happens on windows/amd64. It seems to happen with using most simd functions inside the method, not just simd.BroadcastFloat32s(), but not simd.Emulated(), simd.VectorBitSize(),.
Sorry if this is a known issue, but I could not see it mentioned in the source.
Go version
go version go1.27rc2 linux/amd64
Output of
go envin your module/workspace:What did you do?
$ cat main.go
//go:build go1.27 && goexperiment.simd
package main
import "simd"
type T struct{}
func (T) f() {
simd.BroadcastFloat32s(42)
}
func main() {}
What did you see happen?
$ GOEXPERIMENT=simd go build main.go
./main.go:9:6: internal compiler error: missing Types entry: f@simd0
What did you expect to see?
expected no error (build succeeded)
This also happens on windows/amd64. It seems to happen with using most simd functions inside the method, not just simd.BroadcastFloat32s(), but not simd.Emulated(), simd.VectorBitSize(),.
Sorry if this is a known issue, but I could not see it mentioned in the source.