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: panic on switch case with invalid value #21988
Comments
I was going to look at this out of curiosity, then noticed that this was likely me in 495f55d. Will investigate. |
Manually reduced case:
|
Found the fix, I think. Working on a test and will send the CL. This is technically a regression in 1.9, since 1.8 worked fine. But this is a bit obscure, so I'm not sure if it's worthy of being included into 1.9.x. @ianlancetaylor @mdempsky thoughts? |
Change https://golang.org/cl/65655 mentions this issue: |
I don't think this needs a backport. It is only an ICE for an invalid program, and only after it prints the correct error. Usually we only backport for bugs for which there is no easy workaround. |
Sounds good - thanks for clarifying. |
go version devel +6171d05 Sat Sep 23 09:24:02 2017 +0000 linux/amd64
The following code panics when it is compiled. Go 1.8 does not panic on this code.
I see this panic:
The text was updated successfully, but these errors were encountered: