cmd/compile: internal compiler error: FlagConstant op should never make it to codegen
ALTree opened this issue · 3 comments
ALTree commented
$ gotip version
go version devel +254948a50e Fri Apr 2 17:58:59 2021 +0000 linux/amd64
package p
func f() {
var i, j int
var b bool
i = -(i &^ i)
for 1>>uint(i) == 0 {
_ = func() {
i, b = 0, true
}
i %= j
}
}
$ GOARCH=arm64 gotip tool compile crash.go
crash.go:7:7: internal compiler error: 'f': FlagConstant op should never make it to codegen v62 = FlagConstant <flags>[N=true,Z=false,C=false,V=false]
goroutine 35 [running]:
runtime/debug.Stack(0xf9cf60, 0xc000126008, 0x0)
/home/alberto/go/src/runtime/debug/stack.go:24 +0x9f
cmd/compile/internal/base.FatalfAt(0x707000000002, 0xc000178540, 0x38, 0xc000468020, 0x2, 0x2)
/home/alberto/go/src/cmd/compile/internal/base/print.go:227 +0x1ea
cmd/compile/internal/base.Fatalf(...)
/home/alberto/go/src/cmd/compile/internal/base/print.go:196
cmd/compile/internal/ssagen.(*ssafn).Fatalf(0xc000409170, 0x707000000002, 0xe71564, 0x32, 0xc00010b190, 0x1, 0x1)
/home/alberto/go/src/cmd/compile/internal/ssagen/ssa.go:7356 +0x1f8
cmd/compile/internal/ssa.(*Value).Fatalf(...)
/home/alberto/go/src/cmd/compile/internal/ssa/value.go:409
cmd/compile/internal/arm64.ssaGenValue(0xc00015fc70, 0xc000481b20)
/home/alberto/go/src/cmd/compile/internal/arm64/ssa.go:1101 +0x2072
cmd/compile/internal/ssagen.genssa(0xc0003d56c0, 0xc00015fc00)
/home/alberto/go/src/cmd/compile/internal/ssagen/ssa.go:6636 +0x2bde
cmd/compile/internal/ssagen.Compile(0xc00016a2c0, 0x0)
/home/alberto/go/src/cmd/compile/internal/ssagen/pgen.go:161 +0x298
cmd/compile/internal/gc.compileFunctions.func2.1(0xc000378310, 0xc00016a2c0, 0xc000126560, 0xc000124f40)
/home/alberto/go/src/cmd/compile/internal/gc/compile.go:130 +0x65
created by cmd/compile/internal/gc.compileFunctions.func2
/home/alberto/go/src/cmd/compile/internal/gc/compile.go:128 +0x8e
erifan commented
Fannie is on vacation, I will look at this issue.
gopherbot commented
Change https://golang.org/cl/307650 mentions this issue: cmd/compile: fix bug of conditional instructions on arm64