New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/compile: illegal combination 02044 #57955
Comments
I can repro with 1.20rc3. Same error. |
Weird, this is basically an assembler failure. It would really help to get a reproducer. |
@golang/arm |
@randall77 I can e-mail you the code if you'd like. Or I believe I can invite you to the repo. It's not secret, we just haven't decided on a license yet. |
There is no hurry. If it's going to be available soon (before May 1, say) then we can wait. If not, then try to get a standalone reproducer. Even if we could look at private code, it makes it hard to, e.g., write a test case that we can submit into the public repo. In any case, I don't think I'm the one to look at this. I don't know much about the arm assembler. |
It looks to me that this switch https://cs.opensource.google/go/go/+/master:src/cmd/internal/obj/arm/asm5.go;l=691 may miss a case for HAUTO (and a few others). I'll send a CL for you to try. A reproducer may still be good. Thanks. |
Change https://go.dev/cl/463138 mentions this issue: |
@elagergren-spideroak could you try if CL https://golang.org/cl/463138 helps? (You'll need to build the Go toolchain with that patch applied.) Thanks. |
@cherrymui yup, that fixes it! Tested with |
@elagergren-spideroak could you share a more complete repro so we can have a test case? Thanks. |
@cherrymui I am working on a minimal repro. It might not be perfectly minimal, though. Sorry in advance. |
@cherrymui okay, it's pretty minimal: package main
func main() {
Decode[int16](nil)
Decode[uint16](nil)
Decode[float64](nil)
}
func DecodeInt16(b []byte) (int16, int) {
return 0, 0
}
func DecodeUint16(b []byte) (uint16, int) {
return 0, 0
}
func DecodeFloat64(b []byte) (float64, int) {
return 0, 0
}
func Decode[T any](b []byte) (T, int) {
switch any(*new(T)).(type) {
case int16:
v, n := DecodeInt16(b)
return any(v).(T), n
case uint16:
v, n := DecodeUint16(b)
return any(v).(T), n
case float64:
v, n := DecodeFloat64(b)
return any(v).(T), n
default:
panic("")
}
} $ go version
go version go1.19.1 linux/arm
$ go run main.go
# command-line-arguments
./main.go:33:8: illegal combination 00344 (/tmp/main.go:21) WORD main..autotmp_25-2(SP); NONE NONE HAUTO; from 0 0; to 3 3
$ go1.19.3 run main.go
# command-line-arguments
./main.go:33:8: illegal combination 00344 (/tmp/main.go:21) WORD main..autotmp_25-2(SP); NONE NONE HAUTO; from 0 0; to 3 3 |
Thanks. Added to the CL. |
What version of Go are you using (
go version
)?Can also repro on 1.19.5.
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
It's a large type switch:
The source code is not public (yet) and I haven't been able to create a minimal repro. I can provide the source code privately for debugging purposes, though.
When I comment out both the
int16
anduint16
cases it works.What did you expect to see?
It compile.
What did you see instead?
The text was updated successfully, but these errors were encountered: