cmd/compile: 16 bit-width, short branch too far ICE on loong64
ALTree opened this issue · 2 comments
ALTree commented
$ gotip version
go version devel go1.22-088f953 Mon Aug 7 06:58:18 2023 +0000 linux/amd64
The (unreasonably) big function linked at the bottom of this post triggers an internal compiler error when built for GOARCH=loong64
:
$ GOARCH=loong64 gotip build crash.go
# command-line-arguments
./crash.go:22:5: 16 bit-width, short branch too far
00800 (/home/alberto/crash.go:57) BLTZ R4, 131880
Doesn't crash the compiler on other GOARCHs.
Full reproducer on gist.gihub.com.
cc @golang/loong64
abner-chenc commented
Thank you very much for reporting this bug, I have reproduced the bug and fixed it; I am doing local testing, and I will submit the fixed patch as soon as possible.
gopherbot commented
Change https://go.dev/cl/519915 mentions this issue: cmd/internal/obj/loong64: recheck jump offset boundary after auto-aligning loop heads