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: panicking composite literals not properly flushed to globals #4608
Comments
From the section on assignments: "The assignment proceeds in two phases. First, the operands of index expressions and pointer indirections (including implicit pointer indirections in selectors) on the left and the expressions on the right are all evaluated in the usual order. Second, the assignments are carried out in left-to-right order." This seems to state that any evaluation must be completed before an assignment happens. |
Thank you for reporting this issue @DanielMorsing and for the patience! Indeed this was an inconsistency, but @cherrymui's CL https://go-review.googlesource.com/c/go/+/36410/ for Go1.8 in 2017, appears to have fixed the issue. To me the issue seems to have been incorrect writer barriers for globals before panics were evaluated. In Go1.8 and later, we now get {0, 0} as per https://play.golang.org/p/f2SppbMf9bc which as per Go1.13.7 prints go1.13.7
{0 0} I shall close this issue now. |
The text was updated successfully, but these errors were encountered: