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

cmd/compile: internal compiler error after OpArg expansion delay on PPC64 #43551

Closed
dmitshur opened this issue Jan 6, 2021 · 3 comments
Closed
Labels
arch-ppc64x FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker
Milestone

Comments

@dmitshur
Copy link
Contributor

dmitshur commented Jan 6, 2021

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

Tested with latest tip as of 30 minutes ago.

$ gotip version
go version devel +d2131704a Wed Jan 6 15:02:50 2021 +0000 darwin/amd64

Does this issue reproduce with the latest release?

No, this is a regression on tip.

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

This happens on PPC64 but not AMD64.

What did you do?

I tried to build this minimized reproduce case.

go.mod

module m.test

p.go

package p // import "m.test"

import "m.test/x"

type S   x.S
type Key x.Key

func (s S) A() Key {
	return Key(x.S(s).A())
}

x/x.go

package x // import "m.test/x"

type S struct {
	a Key
}

func (s S) A() Key {
	return s.a
}

type Key struct {
	key int64
}

With:

GOOS=linux GOARCH=ppc64 gotip build

What did you expect to see?

Successful build, like with AMD64.

What did you see instead?

An internal compiler error:

$ GOOS=linux GOARCH=ppc64 gotip build
# m.test
./main.go:9:12: internal compiler error: 'S.A': not lowered: v12, Store SSA PTR STRUCT SSA

goroutine 49 [running]:
runtime/debug.Stack(0x19b87e0, 0xc0000ba008, 0x0)
	/Users/dmitshur/sdk/gotip/src/runtime/debug/stack.go:24 +0x9f
cmd/compile/internal/gc.Fatalf(0xc0003d3e30, 0x8, 0xc0003a0000, 0x2, 0x2)
	/Users/dmitshur/sdk/gotip/src/cmd/compile/internal/gc/subr.go:199 +0x1b0
cmd/compile/internal/gc.(*ssafn).Fatalf(0xc0000a1e30, 0x90c100000002, 0x1892753, 0x2, 0xc0000962a0, 0x1, 0x1)
	/Users/dmitshur/sdk/gotip/src/cmd/compile/internal/gc/ssa.go:7164 +0x1a5
cmd/compile/internal/ssa.(*Func).Fatalf(...)
	/Users/dmitshur/sdk/gotip/src/cmd/compile/internal/ssa/func.go:652
cmd/compile/internal/ssa.checkLower(0xc000124420)
	/Users/dmitshur/sdk/gotip/src/cmd/compile/internal/ssa/lower.go:36 +0x41a
cmd/compile/internal/ssa.Compile(0xc000124420)
	/Users/dmitshur/sdk/gotip/src/cmd/compile/internal/ssa/compile.go:96 +0x98d
cmd/compile/internal/gc.buildssa(0xc0001242c0, 0x0, 0x0)
	/Users/dmitshur/sdk/gotip/src/cmd/compile/internal/gc/ssa.go:470 +0x11ba
cmd/compile/internal/gc.compileSSA(0xc0001242c0, 0x0)
	/Users/dmitshur/sdk/gotip/src/cmd/compile/internal/gc/pgen.go:319 +0x5d
cmd/compile/internal/gc.compileFunctions.func2(0xc000710a20, 0xc0007120a0, 0x0)
	/Users/dmitshur/sdk/gotip/src/cmd/compile/internal/gc/pgen.go:384 +0x4d
created by cmd/compile/internal/gc.compileFunctions
	/Users/dmitshur/sdk/gotip/src/cmd/compile/internal/gc/pgen.go:382 +0x129

Bisection points to this regression being introduced in CL 262117.

CC @dr2chase.

@dmitshur dmitshur added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker arch-ppc64x labels Jan 6, 2021
@dmitshur dmitshur added this to the Go1.16 milestone Jan 6, 2021
@dr2chase dr2chase self-assigned this Jan 7, 2021
@gopherbot
Copy link

Change https://golang.org/cl/282332 mentions this issue: cmd/compile: fix late expand_calls leaf type for OpStructSelect/OpArraySelect

@gopherbot
Copy link

Change https://golang.org/cl/282333 mentions this issue: cmd/compile: relaxing OpStore in ppc64

@gopherbot
Copy link

Change https://golang.org/cl/282315 mentions this issue: cmd/compile: make ppc64 rules less picky about type of 64-bit stores

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-ppc64x FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker
Projects
None yet
Development

No branches or pull requests

3 participants