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

x/tools/go/ssa: GOARCH=386 go test fails #32798

Closed
dominikh opened this issue Jun 26, 2019 · 1 comment
Closed

x/tools/go/ssa: GOARCH=386 go test fails #32798

dominikh opened this issue Jun 26, 2019 · 1 comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Testing An issue that has been verified to require only test changes, not just a test failure. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@dominikh
Copy link
Member

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

$ go version
go version go1.12.5 linux/amd64

Does this issue reproduce with the latest release?

N/A

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

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/dominikh/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/dominikh/prj/"
GOPROXY=""
GORACE=""
GOROOT="/usr/lib/go"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
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-build916129356=/tmp/go-build -gno-record-gcc-switches"

What did you do?

GOARCH=386 go test golang.org/x/tools/go/ssa

What did you expect to see?

Passing tests.

What did you see instead?

--- FAIL: TestBuildPackage (0.00s)
    builder_test.go:63: input.go:5:2: could not import bytes (can't find import: "bytes")
--- FAIL: TestRuntimeTypes (0.00s)
    builder_test.go:232: test "package C; impo": input.go:1:19: could not import bytes (can't find import: "bytes")
    builder_test.go:232: test "package D; impo": input.go:1:19: could not import bytes (can't find import: "bytes")
    builder_test.go:232: test "package E; impo": input.go:1:19: could not import bytes (can't find import: "bytes")
    builder_test.go:232: test "package F; impo": input.go:1:19: could not import bytes (can't find import: "bytes")
    builder_test.go:232: test "package G; impo": input.go:1:19: could not import bytes (can't find import: "bytes")
    builder_test.go:232: test "package G2; imp": input.go:1:20: could not import bytes (can't find import: "bytes")
    builder_test.go:232: test "package I; impo": input.go:1:19: could not import bytes (can't find import: "bytes")
    builder_test.go:232: test "package J; impo": input.go:1:19: could not import bytes (can't find import: "bytes")
    builder_test.go:232: test "package K; impo": input.go:1:19: could not import bytes (can't find import: "bytes")
    builder_test.go:232: test "package L; impo": input.go:1:19: could not import bytes (can't find import: "bytes")
    builder_test.go:232: test "package M; impo": input.go:1:19: could not import bytes (can't find import: "bytes")
--- FAIL: Example_buildPackage (0.00s)
got:
hello.go:4:8: could not import fmt (can't find import: "fmt")
want:
package hello:
  func  init       func()
  var   init$guard bool
  func  main       func()
  const message    message = "Hello, World!":untyped string

# Name: hello.init
# Package: hello
# Synthetic: package initializer
func init():
0:                                                                entry P:0 S:2
	t0 = *init$guard                                                   bool
	if t0 goto 2 else 1
1:                                                           init.start P:1 S:1
	*init$guard = true:bool
	t1 = fmt.init()                                                      ()
	jump 2
2:                                                            init.done P:2 S:0
	return

# Name: hello.main
# Package: hello
# Location: hello.go:8:6
func main():
0:                                                                entry P:0 S:0
	t0 = new [1]interface{} (varargs)                       *[1]interface{}
	t1 = &t0[0:int]                                            *interface{}
	t2 = make interface{} <- string ("Hello, World!":string)    interface{}
	*t1 = t2
	t3 = slice t0[:]                                          []interface{}
	t4 = fmt.Println(t3...)                              (n int, err error)
	return
FAIL
FAIL	golang.org/x/tools/go/ssa	20.446s

/cc @ianthehat @alandonovan

@dominikh dominikh added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jun 26, 2019
@gopherbot gopherbot added this to the Unreleased milestone Jun 26, 2019
@dmitshur dmitshur added the Testing An issue that has been verified to require only test changes, not just a test failure. label Jun 27, 2019
@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Sep 12, 2019
@bcmills
Copy link
Contributor

bcmills commented May 16, 2023

This passes for me as of https://go.dev/cl/495258:

$ go mod init example
go: creating new go.mod: module example

$ go get -t golang.org/x/tools/go/packages@522243a7165d913f0905fc907e8d943d288e3fde
go: added golang.org/x/mod v0.10.0
go: added golang.org/x/sys v0.8.0
go: added golang.org/x/tools v0.9.2-0.20230516190140-522243a7165d

$ GOARCH=386 go test golang.org/x/tools/go/ssa
ok      golang.org/x/tools/go/ssa       24.243s

I'm not sure when it was fixed, but it does seem to be fixed. (@dominikh, please reopen if you find that is not the case.)

@bcmills bcmills closed this as completed May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Testing An issue that has been verified to require only test changes, not just a test failure. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

4 participants