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: ICE: panic: interface conversion: ir.Node is *ir.ConvExpr, not *ir.IndexExpr #66096

Closed
velppa opened this issue Mar 4, 2024 · 6 comments
Assignees
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@velppa
Copy link

velppa commented Mar 4, 2024

Go version

go version go1.22.0 darwin/arm64

Output of go env in your module/workspace:

GO111MODULE=''
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/redacted/Library/Caches/go-build'
GOENV='/Users/redacted/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/redacted/Developer/pkg/mod'
GONOPROXY='github.com/Company/*'
GONOSUMDB='github.com/Company/*'
GOOS='darwin'
GOPATH='/Users/redacted/Developer'
GOPRIVATE='github.com/redacted/*'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/opt/local/lib/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/opt/local/lib/go/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.22.0'
GCCGO='gccgo'
AR='ar'
CC='/usr/bin/clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/Users/redacted/Developer/src/github.com/velppa/go-playground/internal-compiler-error-at-2024-03-04-191051/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 arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/q7/f_x2pvyd0jgc1h2x_rrl3d2m0000gn/T/go-build4100637186=/tmp/go-build -gno-record-gcc-switches -fno-common'

What did you do?

Explicitly converted type map value into the slice. Removing type conversion works.

https://play.golang.org/p/kLwlEV4WW1R

What did you see happen?

Compiler asks to file a bug report:

./prog.go:16:17: internal compiler error: panic: interface conversion: ir.Node is *ir.ConvExpr, not *ir.IndexExpr

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

What did you expect to see?

Compilation succeeds.

@seankhliao seankhliao changed the title ./internal-compiler-error.go: panic: interface conversion: ir.Node is *ir.ConvExpr, not *ir.IndexExpr cmd/compile: interface conversion: ir.Node is *ir.ConvExpr, not *ir.IndexExpr Mar 4, 2024
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Mar 4, 2024
@mknyszek mknyszek added this to the Backlog milestone Mar 4, 2024
@mknyszek mknyszek added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Mar 4, 2024
@mknyszek
Copy link
Contributor

mknyszek commented Mar 4, 2024

CC @golang/compiler

@mknyszek mknyszek changed the title cmd/compile: interface conversion: ir.Node is *ir.ConvExpr, not *ir.IndexExpr cmd/compile: ICE: interface conversion: ir.Node is *ir.ConvExpr, not *ir.IndexExpr Mar 4, 2024
@mknyszek mknyszek changed the title cmd/compile: ICE: interface conversion: ir.Node is *ir.ConvExpr, not *ir.IndexExpr cmd/compile: ICE: panic: interface conversion: ir.Node is *ir.ConvExpr, not *ir.IndexExpr Mar 4, 2024
@mknyszek
Copy link
Contributor

mknyszek commented Mar 6, 2024

CC @mdempsky @cuonglm

@cuonglm
Copy link
Member

cuonglm commented Mar 7, 2024

The bug was introduced in https://go-review.googlesource.com/c/go/+/541715

Sounds like we need to backport the fix.

@cuonglm cuonglm self-assigned this Mar 7, 2024
@cuonglm cuonglm added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Mar 7, 2024
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/569716 mentions this issue: cmd/compile: fix copying SSA-able variables optimization

@cuonglm
Copy link
Member

cuonglm commented Mar 8, 2024

@gopherbot please backport this to go1.22, this bug was introduced during go1.22 development, causing an internal compiler error which is a serious issue.

The fix is small and safe.

@gopherbot
Copy link
Contributor

Backport issue(s) opened: #66178 (for 1.22).

Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases.

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. NeedsFix The path to resolution is known, but the work has not been done.
Projects
Development

No branches or pull requests

5 participants