golang/go

cmd/compile: "internal compiler error: arg 1 does not dominate" with ssacheck on

ALTree opened this issue · 3 comments

go version go1.15.8 linux/amd64
go version go1.16 linux/amd64
go version devel +d4b2638234 Sat Feb 20 03:54:50 2021 +0000 linux/amd64
package p

func f() {
	var b bool
	if b {
		b = true
	}
l:
	for !b {
		b = true
		goto l
	}
}
$ go tool compile -d=ssa/check/seed crash.go 
crash.go:5:2: internal compiler error: 'f': arg 1 of value v7 = Phi <mem> v1 v7 does not dominate, arg=v7 = Phi <mem> v1 v7

This looks like a shortcircuit bug. @josharian this looks like it was introduced at CL 222923.

@ALTree you always have the best CFGs. I’m AFK possibly until Monday but will fix ASAP. Likely to be a very simple, targeted fix.

Change https://golang.org/cl/295130 mentions this issue: cmd/compile: reject some rare looping CFGs in shortcircuit