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: <autogenerated>:1: internal compiler error: panic: runtime error: invalid memory address or nil pointer dereference #54671

Closed
reusee opened this issue Aug 25, 2022 · 1 comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge

Comments

@reusee
Copy link

reusee commented Aug 25, 2022

What version of Go are you using (go version)?

$ go version
go version go1.19 darwin/arm64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/reus/Library/Caches/go-build"
GOENV="/Users/reus/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/reus/pkg/mod"
GONOPROXY="github.com/reusee/*"
GONOSUMDB="github.com/reusee/*"
GOOS="darwin"
GOPATH="/Users/reus"
GOPRIVATE="github.com/reusee/*"
GOPROXY="https://goproxy.cn,direct"
GOROOT="/opt/local/lib/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/opt/local/lib/go/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.19"
GCCGO="gccgo"
AR="ar"
CC="/usr/bin/clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/reus/matrixorigin/matrixone/ice/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/4r/qbq6ljvd4y3c89_zw3yr24v40000gn/T/go-build2375435396=/tmp/go-build -gno-record-gcc-switches -fno-common"
GOROOT/bin/go version: go version go1.19 darwin/arm64
GOROOT/bin/go tool compile -V: compile version go1.19
uname -v: Darwin Kernel Version 21.6.0: Sat Jun 18 17:07:22 PDT 2022; root:xnu-8020.140.41~1/RELEASE_ARM64_T6000
ProductName:	macOS
ProductVersion:	12.5
BuildVersion:	21G72
lldb --version: lldb-1316.0.9.46
Apple Swift version 5.6.1 (swiftlang-5.6.0.323.66 clang-1316.0.20.12)

What did you do?

package foo

type B[T any] struct {
}

type A interface {
	a(A)
}

func (e *B[T]) a(o A) {
	_ = o.(*B[T])
}

type C[T any] struct {
	_ *B[T]
}

func D() {
	var _ *C[int]
}

What did you expect to see?

compile OK

What did you see instead?

:1: internal compiler error: panic: runtime error: invalid memory address or nil pointer dereference

@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Aug 25, 2022
@cuonglm
Copy link
Member

cuonglm commented Aug 25, 2022

Duplicated of #54302

@cuonglm cuonglm closed this as completed Aug 25, 2022
@golang golang locked and limited conversation to collaborators Aug 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

3 participants