-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Description
What version of Go are you using (go version)?
$ go version devel go1.22-126db88cc8 Fri Oct 20 16:12:52 2023 +0800
Does this issue reproduce with the latest release?
// a.go
package a
type A struct {
}
func (*A) Print() {
}// b.go
package b
import "./a"
var B *a.A
}// main.go
package main
import "./b"
func main() {
b.B.Print()
}What operating system and processor architecture are you using (go env)?
go env Output
$ go envGO111MODULE='on'
GOARCH='amd64'
GOBIN=''
GOCACHE='/Users/bytedance/Library/Caches/go-build'
GOENV='/Users/bytedance/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/bytedance/gopackage/pkg/mod'
GONOPROXY='.byted.org,.everphoto.cn,git.smartisan.com'
GONOSUMDB='.byted.org,.everphoto.cn,git.smartisan.com'
GOOS='darwin'
GOPATH='/Users/bytedance/gopackage'
GOPRIVATE='.byted.org,.everphoto.cn,git.smartisan.com'
GOPROXY='https://goproxy.byted.org|https://goproxy.cn|direct'
GOROOT='/Users/bytedance/go_google'
GOSUMDB=''
GOTMPDIR=''
GOTOOLCHAIN=''
GOTOOLDIR='/Users/bytedance/go_google/pkg/tool/darwin_amd64'
GOVCS=''
GOVERSION='devel go1.22-126db88cc8 Fri Oct 20 16:12:52 2023 +0800'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='clang'
CXX='clang++'
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 -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/b1/0fd1b6hs7lz0fm_mh346lybm0000gn/T/go-build831658170=/tmp/go-build -gno-record-gcc-switches -fno-common'
What did you do?
go build -gcflags="-m"What did you expect to see?
./main.go:5:6: can inline main
./main.go:6:11: inlining call to a.(*A).PrintWhat did you see instead?
./main.go:5:6: can inline mainMetadata
Metadata
Assignees
Labels
Type
Projects
Status