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 error for math.Sqrt as statement rather than expression #16804
Comments
Simpler replication:
Works if the line in the function is
I initially marked this as 1.7.1, but considering that the statement is useless, dropping to 1.8. |
Bug verified under go version go1.7 windows/amd64. |
Should be a straightforward fix. Perhaps @odeke-em @kevinburke or @martisch (or anyone else getting up to speed on the compiler who I might have missed) wants to try their hand? Leave a note here first so you don't collide with each other. :) |
Note also (as Ian observes) that the only possible purpose of the statement is to evaluate the internal expression for side effects, so there's no need to generate an actual additional SSA value. |
seems:
in ssa.go should suffice. Will mail a full CL later. |
CL https://golang.org/cl/27437 mentions this issue. |
go version go1.7 darwin/amd64
https://play.golang.org/p/ERICb8NpYL
Don't actually run the playground, this is just the content of the file, make a file called whatever_test.go and try to test it.
The text was updated successfully, but these errors were encountered: