-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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 compiler error: Value live at entry. It shouldn't be. #52673
Comments
Closing on the assumption that this is a dup of #52590. Thanks for reporting it. |
@ianlancetaylor This is different bug involve initialization of composite literal. |
Yeah, #52590 was an exporter issue, but this issue is reproducible with a single source file (i.e., no export involved). |
Ah, sorry. |
FWIW, the issue repros in Go 1.17 too, after removing generics: https://go.dev/play/p/3iLxskmJgIS?v=goprev Edit: Simpler: https://go.dev/play/p/UU1h7nOwoyY?v=goprev |
@mdempsky Seems the bug was introduced when the compiler was changed to handle array literal with more than 4 elements. This program:
compile ok with go1.4 😃 |
@cuonglm Thanks. Do you want to take this issue? |
Yes, no problem! |
@mdempsky So for code like:
We initialize the code roughly as:
Then call to fixedlit at L573 (cmd/compile/internal/walk/complit.go) rewrites it to:
I have no ideal how to fix it yet. |
@cuonglm Okay, I can take a look tomorrow. Thanks for investigating! |
Don't mind, I think I figured it out! |
Change https://go.dev/cl/403995 mentions this issue: |
@dmitshur did we want to push for a backport for this one, or does it not make the train for next week? |
This isn't a Go 1.18 regression. I don't think it needs to be backported. |
Generally ICEs that are triggered only by fuzzing the compiler don't need backporting. |
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://go.dev/play/p/sgQ1Oc01pz2
What did you expect to see?
compile successfully
What did you see instead?
The text was updated successfully, but these errors were encountered: