Skip to content

cmd/compile: internal compiler error: schedule does not include all values in block on s390x #39472

Closed
@ALTree

Description

@ALTree
$ gotip version
go version devel +cacac8bdc5 Tue Jun 9 02:49:06 2020 +0000 linux/amd64

The following program:

package p

func f() bool {
	var c float64
	c = 0
	c = -c + 1
	return (c != 0) == (c != 0)
}

Crashes the tip compiler when built for s390x with optimizations disabled:

$ GOARCH=s390x gotip tool compile -N crash.go

crash.go:7:27: internal compiler error: 'f': schedule does not include all values in block b1
goroutine 1 [running]:
runtime/debug.Stack(0xd4bb80, 0xc00000e018, 0x0)
	/home/alberto/go/src/runtime/debug/stack.go:24 +0x9f
cmd/compile/internal/gc.Fatalf(0xc00001a300, 0x36, 0xc0003cb920, 0x2, 0x2)
	/home/alberto/go/src/cmd/compile/internal/gc/subr.go:199 +0x1b0
cmd/compile/internal/gc.(*ssafn).Fatalf(0xc000011d10, 0x71b100000002, 0xc63c80, 0x30, 0xc000046b10, 0x1, 0x1)
	/home/alberto/go/src/cmd/compile/internal/gc/ssa.go:6844 +0x1a5
cmd/compile/internal/ssa.(*Func).Fatalf(...)
	/home/alberto/go/src/cmd/compile/internal/ssa/func.go:625
cmd/compile/internal/ssa.schedule(0xc00013c420)
	/home/alberto/go/src/cmd/compile/internal/ssa/schedule.go:306 +0x1baa
cmd/compile/internal/ssa.Compile(0xc00013c420)
	/home/alberto/go/src/cmd/compile/internal/ssa/compile.go:93 +0x9d1
cmd/compile/internal/gc.buildssa(0xc00013c2c0, 0x0, 0x0)
	/home/alberto/go/src/cmd/compile/internal/gc/ssa.go:460 +0xd25
cmd/compile/internal/gc.compileSSA(0xc00013c2c0, 0x0)
	/home/alberto/go/src/cmd/compile/internal/gc/pgen.go:317 +0x5d
cmd/compile/internal/gc.compile(0xc00013c2c0)
	/home/alberto/go/src/cmd/compile/internal/gc/pgen.go:275 +0x345
cmd/compile/internal/gc.funccompile(0xc00013c2c0)
	/home/alberto/go/src/cmd/compile/internal/gc/pgen.go:220 +0xc5
cmd/compile/internal/gc.Main(0xc6e560)
	/home/alberto/go/src/cmd/compile/internal/gc/main.go:747 +0x344f
main.main()
	/home/alberto/go/src/cmd/compile/main.go:52 +0xb1

It compiles fine on go1.14.4, so this is a tip regression. I'm tentatively labelling this as a release-blocker, but leaving to you to decide if this is fine.

cc @mundaym @randall77 @cherrymui

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.okay-after-beta1Used by release team to mark a release-blocker issue as okay to resolve either before or after beta1release-blocker

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions