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

go/internal/gccgoimporter: TestInstallationImporter broken with tip gccgo #44425

Closed
thanm opened this issue Feb 19, 2021 · 5 comments
Closed
Milestone

Comments

@thanm
Copy link
Contributor

thanm commented Feb 19, 2021

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

$ go version
go version devel +e8379ab596 Sat Nov 7 16:59:40 2020 +0000 linux/amd64

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="amd64"
GOBIN=""
GOCACHE="/usr/local/google/home/thanm/.cache/go-build"
GOENV="/usr/local/google/home/thanm/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/ssd2/go1/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/ssd2/go1"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/ssd2/ygo"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/ssd2/ygo/pkg/tool/linux_amd64"
GCCGO="/ssd/gcc-trunk/cross/bin/gccgo"
AR="ar"
CC="gcc"
CXX="g++"It looks as though the signature for sorts.Int was changed as part of 1.16 in af8748054b, and this change has now made it into gccgo tip.  Given that the test is picking sort.Ints in an arbitrary fashion, it's probably best to pick a different type to examine.
It looks as though the signature for sorts.Int was changed as part of 1.16 in af8748054b, and this change has now made it into gccgo tip.  Given that the test is picking sort.Ints in an arbitrary fashion, it's probably best to pick a different type to examine.

CGO_ENABLED="1"
GOMOD="/ssd2/ygo/src/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build254549658=/tmp/go-build -gno-record-gcc-switches"

What did you do?

This requires using "tip" gccgo, as opposed to released gccgo. Add "gccgo" to PATH, then

$ cd `go env GOROOT`
$ cd src/go/internal/gccgoimporter
$ go test .

What did you expect to see?

Passing test

What did you see instead?

This faliure:

--- FAIL: TestInstallationImporter (0.65s)
    importer_test.go:41: Ints: got "func Ints(x []int)"; want "func Ints(a []int)"
FAIL
FAIL	go/internal/gccgoimporter	1.233s
FAIL

It looks as though the signature for sorts.Int was changed as part of 1.16 in af87480, and this change has now made it into gccgo tip at https://go-review.googlesource.com/c/gofrontend/+/280172. Given that the test is picking sort.Ints in an arbitrary fashion, it's probably best to pick a different type to examine.

@thanm thanm added this to the Go1.17 milestone Feb 19, 2021
@thanm thanm self-assigned this Feb 19, 2021
@thanm thanm changed the title go/internal/gccgoimporter: TestInstallationImporter broken on tip go/internal/gccgoimporter: TestInstallationImporter broken with tip gccgo Feb 19, 2021
@gopherbot
Copy link

Change https://golang.org/cl/294290 mentions this issue: go/internal/gccgoimporter: fix up gccgo installation test

@ianlancetaylor
Copy link
Contributor

@gopherbot Please backport to 1.16

This is fixed on tip, but causes a test failure on 1.16 when gccgo is installed. The fix is trivial (https://golang.org/cl/294290) so let's backport it.

@gopherbot
Copy link

Backport issue(s) opened: #47610 (for 1.16).

Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases.

@gopherbot
Copy link

Change https://golang.org/cl/340952 mentions this issue: go/internal/gccgoimporter: fix up gccgo installation test

@gopherbot
Copy link

Change https://golang.org/cl/362247 mentions this issue: go/internal/gccgoimporter: fix up gccgo installation test

gopherbot pushed a commit to golang/tools that referenced this issue Nov 8, 2021
Change the TestInstallationImporter testpoint to query type
information for sort.Search instead of sort.Ints. The latter function
changed recently (1.16 timeframe), parameter "a" is now "x". A better
candidate for this sort of query is sort.Search, which has been stable
or a while.

This is a copy of CL 294290 from the main repo.

Updates golang/go#44425.

Change-Id: Ibc79602cafc46c20be4b085f9a92977b06f9d658
Reviewed-on: https://go-review.googlesource.com/c/tools/+/362247
Trust: Than McIntosh <thanm@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
@rsc rsc unassigned thanm Jun 23, 2022
@golang golang locked and limited conversation to collaborators Jun 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants