-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/compile: internal compiler error: expected struct { int } value to have type struct { int } #50190
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
Comments
cc @danscales Tentatively labelling as release-blocker to prevent it from slipping through, but feel free to reassess its priority. |
I was able to reproduce this on linux/amd64. The failure is:
|
@go101 Oh, the spec said that:
So that includes embedded fields. |
@cuonglm I don't deny it is a comparison bug. |
@go101 According to the spec, and what @griesemer explained in #24721 (comment), |
I mean I agree with the conclusion. ;) |
@mdempsky Do you want to take a look at this bug, especially if it might be related to your change: |
Assigning to you Matthew, feel free to unassign or assign to me/Keith if it decide it doesn't make sense for you to analyze/fix. |
Change https://golang.org/cl/372914 mentions this issue: |
The fix in CL 372914 introduced a race that is now showing up in the |
Change https://golang.org/cl/378434 mentions this issue: |
Using type aliases, it's possible to create structs with embedded fields that have no corresponding type literal notation. However, we still need to generate a unique name for these types to use for linker symbols. This CL introduces a new "struct{ Name = Type }" syntax for use in LinkString formatting to represent these types. Fixes golang#50190. Change-Id: I025ceb09a86e00b7583d3b9885d612f5d6cb44fe Reviewed-on: https://go-review.googlesource.com/c/go/+/372914 Run-TryBot: Matthew Dempsky <[email protected]> Trust: Matthew Dempsky <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Dan Scales <[email protected]> Trust: Dan Scales <[email protected]> Reviewed-by: Cuong Manh Le <[email protected]> Reviewed-by: Robert Griesemer <[email protected]>
Using type aliases, it's possible to create structs with embedded fields that have no corresponding type literal notation. However, we still need to generate a unique name for these types to use for linker symbols. This CL introduces a new "struct{ Name = Type }" syntax for use in LinkString formatting to represent these types. Reattempt at CL 372914, which was rolled back due to race-y LocalPkg.Lookup call that isn't safe for concurrency. Fixes golang#50190. Change-Id: I0b7fd81e1b0b3199a6afcffde96ade42495ad8d1 Reviewed-on: https://go-review.googlesource.com/c/go/+/378434 Trust: Matthew Dempsky <[email protected]> Run-TryBot: Matthew Dempsky <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Robert Griesemer <[email protected]>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
In 1.18 beta 1, not in 1.17.5,
What did you do?
What did you expect to see?
compiles okay
What did you see instead?
crashes compiler
The text was updated successfully, but these errors were encountered: