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: assertion failed #66272

Closed
ArnoSen opened this issue Mar 12, 2024 · 6 comments
Closed

cmd/compile: internal compiler error: assertion failed #66272

ArnoSen opened this issue Mar 12, 2024 · 6 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime.

Comments

@ArnoSen
Copy link

ArnoSen commented Mar 12, 2024

Go version

go version go1.22.1 linux/amd64

Output of go env in your module/workspace:

GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/USER/.cache/go-build'
GOENV='/home/USER/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/USER/go/pkg/mod'
GONOPROXY='privatrepo'
GONOSUMDB='privatrepo'
GOOS='linux'
GOPATH='/home/USER/go'
GOPRIVATE='privaterepo'
GOPROXY='https://proxy.private'
GOROOT='/opt/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/opt/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.22.1'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/dev/null'
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 -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build535733520=/tmp/go-build -gno-record-gcc-switches'

What did you do?

During refactor I added a panic() to be sure that I was fixing that later. Then compilation failed
See the stripped down code in attached zip (see first comment)

What did you see happen?

$ go build
github.com/user/some/jaccount
CLOSURE [/int_compile_err/jaccount/mailbox.go:52:22:var jmbs github.com/user/some/jaccount.JMailboxes]
: internal compiler error: assertion failed

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

What did you expect to see?

I would expect it to compile just fine or give a compile error.

@ArnoSen
Copy link
Author

ArnoSen commented Mar 12, 2024

I uploaded the correct zip file. I forgot the recursive flag in the initial upload.
int_compile_err.zip

@cuonglm
Copy link
Member

cuonglm commented Mar 12, 2024

It seems to me this is duplicated of #65593.

@seankhliao seankhliao changed the title internal compiler error: assertion failed cmd/compile: internal compiler error: assertion failed Mar 12, 2024
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Mar 12, 2024
@cuonglm
Copy link
Member

cuonglm commented Mar 13, 2024

@ArnoSen Could you please trying gotip and see if the issue were fixed?

Since you did not post any code nor github repo, we could not reproduce and verify the issue.

@ArnoSen
Copy link
Author

ArnoSen commented Mar 13, 2024

Hi, I wil try. BTW, the code is in the zip file.

https://github.com/golang/go/files/14575193/int_compile_err.zip

@ArnoSen
Copy link
Author

ArnoSen commented Mar 13, 2024

The same error persists with the latest gotip (go version devel go1.23-a46ecdc Tue Mar 12 19:38:41 2024 +0000 linux/amd64)

me@pc:~/personal/go/int_compile_err $ go version
go version go1.22.1 linux/amd64
me@pc:~/personal/go/int_compile_err $ go build
# github.com/user/some/jaccount
CLOSURE [/home/arno-overgaauw/personal/go/int_compile_err/jaccount/mailbox.go:52:22:var jmbs github.com/user/some/jaccount.JMailboxes]
<unknown line number>: internal compiler error: assertion failed

Please file a bug report including a short program that triggers the error.
https://go.dev/issue/new
me@pc:~/personal/go/int_compile_err $ ~/sdk/gotip/bin/go version
go version devel go1.23-a46ecdc Tue Mar 12 19:38:41 2024 +0000 linux/amd64
me@pc:~/personal/go/int_compile_err $ ~/sdk/gotip/bin/go build
# github.com/user/some/jaccount
CLOSURE [/home/arno-overgaauw/personal/go/int_compile_err/jaccount/mailbox.go:52:22:var jmbs github.com/user/some/jaccount.JMailboxes]
<unknown line number>: internal compiler error: assertion failed

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

@ArnoSen
Copy link
Author

ArnoSen commented Mar 13, 2024

I was pointed out that maybe I did not invoke gotip correctly. (actuall it is the first time I use it).
When I do it like this, there is no error:

me@pc:~/personal/go/int_compile_err $ gotip build
me@pc:~/personal/go/int_compile_err $ 

@cuonglm cuonglm closed this as completed Mar 13, 2024
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.
Projects
None yet
Development

No branches or pull requests

3 participants