golang/go

cmd/compile: compiler crashes with "stuck in spanz loop" error on s390x with -N

ALTree opened this issue · 1 comments

$ gotip version
go version devel +f7c767edc5 Sat May 5 00:54:52 2018 +0000 linux/amd64

The (lengthy) go program at:

https://gist.github.com/ALTree/463f8b338c112f33ba59857b4db219d2

crashes the tip compiler when built for s390x with optimizations disabled.

$ GOARCH=s390x gotip tool compile -N crash.go 
crash.go:1259:37: stuck in spanz loop

The program compiles fine on amd64 and other architectures I tested. The error message comes from obj/s390x/asmz.go and it's surrounded by:

430-		if loop > 10 {
431:			c.ctxt.Diag("stuck in spanz loop")
432-			break
433-		}

Maybe 10 was too optimistic?

cc @mundaym

Change https://golang.org/cl/122235 mentions this issue: cmd/internal/obj/s390x: increase maximum number of loop iterations