Skip to content
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. [1.16 backport] #44358

Closed
gopherbot opened this issue Feb 18, 2021 · 4 comments
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Milestone

Comments

@gopherbot
Copy link

@mdempsky requested issue #44355 to be considered for backport to the next 1.16 minor release.

@gopherbot please backport to Go 1.16

@mdempsky
Copy link
Member

This is a compiler crash on valid code that used to work with Go 1.15.

@dmitshur dmitshur added this to the Go1.16.1 milestone Feb 19, 2021
@cagedmantis
Copy link
Contributor

Approved. This is a serious issue.

@cagedmantis cagedmantis added the CherryPickApproved Used during the release process for point releases label Feb 25, 2021
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Feb 25, 2021
@gopherbot
Copy link
Author

Change https://golang.org/cl/296569 mentions this issue: [release-branch.go1.16] cmd/compile: declare inlined result params early for empty returns

@gopherbot
Copy link
Author

Closed by merging ddeae6b to release-branch.go1.16.

gopherbot pushed a commit that referenced this issue Mar 1, 2021
…rly for empty returns

The code for delayed declaration of inlined result parameters only
handles non-empty return statements. This is generally okay, because
we already early declare if there are any (non-blank) named result
parameters.

But if a user writes a function with only blank result parameters and
with exactly one return statement, which is empty, then they could end
up hitting the dreaded "Value live at entry" ICE.

This CL fixes the issue by ensuring we always early declare inlined
result parameters if there are any empty return statements.

Fixes #44358.

Change-Id: I315f3853be436452883b1ce31da1bdffdf24d506
Reviewed-on: https://go-review.googlesource.com/c/go/+/293293
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/296569
@toothrot toothrot modified the milestones: Go1.16.1, Go1.16.2 Mar 10, 2021
@golang golang locked and limited conversation to collaborators Mar 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

5 participants