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: bitwise OR of fp constants triggers an internal compiler error #31060
Comments
cc @mdempsky |
Looks like was not an ICE in 1.11.
|
Technically, an "illegal constant expression" was still an ICE. ;) But yes, hmm, this is definitely related to my const.go refactoring. I'll take a look. |
Change https://golang.org/cl/169719 mentions this issue: |
This might be worth backporting to Go 1.12. It's only affects invalid Go code (i.e., failing with ICE instead of emitting a proper compiler error), but it's still technically a regression in Go 1.12 from Go 1.11. |
The guideline on backports isn't to fix all regressions, it's to only backport patches that fix serious bugs with no workaround. There is always a workaround for invalid code, so I don't think we need to backport this. |
@ianlancetaylor Okay, SGTM. |
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?
https://play.golang.org/p/__u_Ihvs3Vg
What did you expect to see?
No "internal compiler error". Probably a message like "operator | not defined on floating point constants" would be nice.
What did you see instead?
The text was updated successfully, but these errors were encountered: