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: not lowered: v46, Load ARRAY PTR64 SSA #26120

ALTree opened this issue Jun 28, 2018 · 2 comments


None yet
2 participants
Copy link

commented Jun 28, 2018

$ gotip version
go version devel +c07f2b0099 Thu Jun 28 17:46:02 2018 +0000 linux/amd64

The following program (reduced from a gosmith-generated one):

package p

type T [1]struct {
	f    []int
	i, j int

func F() {
	var v T
	f := func() T {
		return v
	_ = []int{}[f()[0].i]

crashes the tip compiler with the following error:

$ gotip build crash.go 
# command-line-arguments
./crash.go:13:18: internal compiler error: not lowered: v46, Load ARRAY PTR64 SSA

goroutine 8 [running]:
runtime/debug.Stack(0x0, 0x0, 0x0)
	/home/alberto/go/src/runtime/debug/stack.go:24 +0xa7
cmd/compile/internal/gc.Fatalf(0xca3be5, 0x2, 0xc0004fc0e0, 0x1, 0x1)
	/home/alberto/go/src/cmd/compile/internal/gc/subr.go:182 +0x1f7
cmd/compile/internal/gc.(*ssafn).Fatalf(0xc0004c8000, 0xd12000000002, 0xca3be5, 0x2, 0xc0004fc0e0, 0x1, 0x1)
	/home/alberto/go/src/cmd/compile/internal/gc/ssa.go:5583 +0x67
cmd/compile/internal/ssa.(*Func).Fatalf(0xc0004cc000, 0xca3be5, 0x2, 0xc0004fc0e0, 0x1, 0x1)
	/home/alberto/go/src/cmd/compile/internal/ssa/func.go:562 +0x73
	/home/alberto/go/src/cmd/compile/internal/ssa/lower.go:36 +0x34d
	/home/alberto/go/src/cmd/compile/internal/ssa/compile.go:70 +0x30e
cmd/compile/internal/gc.buildssa(0xc00035e000, 0x1, 0x0)
	/home/alberto/go/src/cmd/compile/internal/gc/ssa.go:211 +0xaa7
cmd/compile/internal/gc.compileSSA(0xc00035e000, 0x1)
	/home/alberto/go/src/cmd/compile/internal/gc/pgen.go:259 +0x39
cmd/compile/internal/gc.compileFunctions.func2(0xc0004bab40, 0xc0000166c0, 0x1)
	/home/alberto/go/src/cmd/compile/internal/gc/pgen.go:323 +0x49
created by cmd/compile/internal/gc.compileFunctions
	/home/alberto/go/src/cmd/compile/internal/gc/pgen.go:321 +0x11a

It compiles fine on go1.10.


This comment has been minimized.

Copy link
Member Author

commented Jun 28, 2018

I'm too sleepy to bisect so cc-ing at random @randall77 @dr2chase @cherrymui


This comment has been minimized.

Copy link

commented Jun 29, 2018

Change mentions this issue: cmd/compile: check SSAability in handling of INDEX of 1-element array

@gopherbot gopherbot closed this in d21bdf1 Jun 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.