-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: internal compiler error in Go 1.18 using type parameters #51909
Comments
Thanks for the report. CC @randall77 |
It seems to me this is the reverse of #49309. There, we don't inline a function that has no shape parameters, but is passed at least one shape arg. Here, we may not want to inline a function that has shape parameters, but is passed no shape arg. |
Successfully builds and runs (prints |
Change https://go.dev/cl/395854 mentions this issue: |
Same problem using 1.18 and 1.18.1 with other similar code. |
ping: this is a release blocker that hasn't been updated in a while. |
Change https://go.dev/cl/424775 mentions this issue: |
The non-unified frontend had repeated issues with inlining and generics (#49309, #51909, #52907), which led us to substantially restrict inlining when shape types were present. However, these issues are evidently not present in unified IR's inliner, and the safety restrictions added for the non-unified frontend can simply be disabled in unified mode. Fixes #54497. Change-Id: I8e6ac9f3393c588bfaf14c6452891b9640a9d1bd Reviewed-on: https://go-review.googlesource.com/c/go/+/424775 Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com>
What version of Go are you using (
go version
)?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?
I triggered an internal compiler error while playing around with Go 1.18 type parameters (generics). From https://go.dev/play/p/AlyOOLesUjM:
What did you expect to see?
Successful compilation.
What did you see instead?
The text was updated successfully, but these errors were encountered: