Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/compile: internal compiler error with zero-size types #65808

Closed
fabe-xx opened this issue Feb 20, 2024 · 2 comments
Closed

cmd/compile: internal compiler error with zero-size types #65808

fabe-xx opened this issue Feb 20, 2024 · 2 comments
Assignees
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@fabe-xx
Copy link

fabe-xx commented Feb 20, 2024

Go version

go version go1.22.0 darwin/amd64

Output of go env in your module/workspace:

GO111MODULE='on'
GOARCH='amd64'
GOBIN=''
GOCACHE='/Users/fabianr/Library/Caches/go-build'
GOENV='/Users/fabianr/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT='rangefunc'
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/fabianr/e/be/gohome/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/fabianr/e/be/gohome'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/darwin_amd64'
GOVCS=''
GOVERSION='go1.22.0'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/Users/fabianr/go/src/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/5y/2cd0ydxn7nl7sz2nnk3d91xc0000gn/T/go-build3586506670=/tmp/go-build -gno-record-gcc-switches -fno-common'

What did you do?

This playground code.

What did you see happen?

I would expect it to compile (it does in Go 1.21).

What did you expect to see?

It does not:

<autogenerated>:1: internal compiler error: 'foo.toStrings': value v2 still has 1 uses

Please file a bug report including a short program that triggers the error.
https://go.dev/issue/new

Go build failed.
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Feb 20, 2024
@cuonglm
Copy link
Member

cuonglm commented Feb 20, 2024

git bisect points to https://go-review.googlesource.com/c/go/+/507295

cc @dr2chase

@thanm thanm added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Feb 20, 2024
@mknyszek mknyszek added this to the Backlog milestone Feb 28, 2024
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/568258 mentions this issue: cmd/compile: add 0-sized-value simplification to copyelim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
Development

No branches or pull requests

6 participants