Skip to content

cmd/compile: 1.21rc2 internal compiler error: missing wrapper for (method) #60945

@evanj

Description

@evanj

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

$ go version
go version go1.21rc2 darwin/arm64

Does this issue reproduce with the latest release?

This is on 1.21rc2 only; 1.20.5 works.

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

go env Output
$ go env
GO111MODULE=''
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/evan.jones/Library/Caches/go-build'
GOENV='/Users/evan.jones/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/evan.jones/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/evan.jones/go'
GOPRIVATE=''
GOPROXY=''
GOROOT='/Users/evan.jones/.gimme/versions/go1.21rc2.darwin.arm64'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/Users/evan.jones/.gimme/versions/go1.21rc2.darwin.arm64/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.21rc2'
GCCGO='gccgo'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/Users/evan.jones/dd/dd-go/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/g1/97d8s0r57hj4nv4_qd3fqcrm0000gp/T/go-build3625918932=/tmp/go-build -gno-record-gcc-switches -fno-common'

What did you do?

Attempt to run the following program (github repository version):

main.go

package main

import (
	"fmt"

	"github.com/evanj/go121bug/pkg"
)

func main() {
	out := &pkg.Router{}
	fmt.Println(out.Route)
}

pkg/pkg.go

package pkg

import "fmt"

type Router struct{}

func callClosure(closure func()) {
	closure()
}

// Route is the obs_pipelines router
func (r *Router) Route() {
	callClosure(func() {
		fmt.Println("getConfigVersion:", r.getConfigVersion)
	})
}

func (r *Router) getConfigVersion() {}

What did you expect to see?

Some output:

$ go run .
0x10248fcb0

What did you see instead?

$ /Users/evan.jones/.gimme/versions/go1.21rc2.darwin.arm64/bin/go run .
# github.com/evanj/go121bug
./pkg/pkg.go:14:37: internal compiler error: missing wrapper for pkg.getConfigVersion

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

Metadata

Metadata

Assignees

Labels

FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.compiler/runtimeIssues related to the Go compiler and/or runtime.release-blocker

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions