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: "panic: interface conversion" when compiling a test that calls a generic function #48094
Comments
It seems to me that https://go-review.googlesource.com/c/go/+/335413 which changed |
CL 335413 makes |
Yeah, I think we need to update the import/export to support this case. Unified IR is also affected cc @mdempsky |
Change https://golang.org/cl/346469 mentions this issue: |
Change https://golang.org/cl/346769 mentions this issue: |
Change https://golang.org/cl/347271 mentions this issue: |
CL 346469 added support for unsafe.Sizeof and friends to operate on generic parameters for compiler importer/exporter. This CL adds support for unified IR. Updates #48094 Change-Id: I63af1a7c3478f59b03ecc23229ac2254d3457868 Reviewed-on: https://go-review.googlesource.com/c/go/+/346769 Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Currently, if a test explicitly specify -G flag, if that flag conflict with compiler default -G flag, the test will be skipped. That's the reason CL 346469 haven't fixed the unified IR stuff, but still make the unified builder passed. This CL makes run.go always run the test in unified IR mode, regardless of the explicit -G flag specified. Updates #48094 Change-Id: I959ecaff6aca07844f0ffcf36caa60cf0747e8ce Reviewed-on: https://go-review.googlesource.com/c/go/+/347271 Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com> Trust: Keith Randall <khr@golang.org> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Change https://golang.org/cl/347529 mentions this issue: |
When reading body of inlining function, which has another inlined function in the body, the reader still add this inlined function to todoBodies, which it shouldn't because the inlined function was read already. To fix this, introduce new flag to signal that we are done construting all functions in todoBodies, thus the addBody shouldn't add anything to todoBodies then. Updates #48094 Change-Id: I45105dd518f0a7b69c6dcbaf23b957623f271203 Reviewed-on: https://go-review.googlesource.com/c/go/+/347529 Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
N/A
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
In the root of the repository at bcmills/unsafeslice@849066c, run
go test .
.What did you expect to see?
A successful test run, or a test failure, or a compile error indicating a problem in my code.
What did you see instead?
panic: interface conversion: types.Object is nil, not *ir.Name
CC @mdempsky @findleyr @griesemer
The text was updated successfully, but these errors were encountered: