cmd/compile: emit a symbol for a method expression when using -dynlink

Fixes #25065

Change-Id: Ia3db518cfd9c006caf951b51342a491ac8372e9c
Reviewed-on: https://go-review.googlesource.com/c/153297
Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
Ian Lance Taylor 2018-12-07 18:22:04 -08:00
parent 56b70d98f5
commit 1ac3b06181
3 changed files with 32 additions and 0 deletions

View file

@ -911,3 +911,9 @@ func TestGlobal(t *testing.T) {
func TestTestInstalledShared(t *testing.T) {
goCmd(nil, "test", "-linkshared", "-test.short", "sync/atomic")
}
// Test generated pointer method with -linkshared.
// Issue 25065.
func TestGeneratedMethod(t *testing.T) {
goCmd(t, "install", "-buildmode=shared", "-linkshared", "issue25065")
}