golang/go

cmd/compile: internal compiler error: PPC64 shift arg mb out of range

ALTree opened this issue · 1 comments

$ gotip version
go version devel +f423d616b1 Fri Nov 13 15:15:15 2020 +0000 linux/amd64

The following program:

package p

func f(a []int, i uint) {
	g := func(p int) int {
		i = uint(p) * (uint(p) & (i & 1))
		return 1
	}
	a[0] = g(8) >> 1
}

Crashes the tip compiler when built for ppc64 or ppc64le:

$ GOARCH=ppc64 gotip tool compile crash.go

# command-line-arguments
./crash.go:8:4: internal compiler error: 'f': panic during lower while compiling f:

PPC64 shift arg mb out of range

[...]

It compiles fine on go1.15.5.

Bisected to 967465d.

cc @laboger

Change https://golang.org/cl/270358 mentions this issue: cmd/compile: fix rules regressions with shifts on PPC64