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

gopherbot opened this issue Feb 18, 2021 · 4 comments
CherryPickApproved FrozenDueToAge


Copy link

@gopherbot gopherbot commented Feb 18, 2021

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

@gopherbot please backport to Go 1.16

Copy link

@mdempsky mdempsky commented Feb 18, 2021

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
Copy link

@cagedmantis cagedmantis commented Feb 25, 2021

Approved. This is a serious issue.

@cagedmantis cagedmantis added the CherryPickApproved label Feb 25, 2021
@gopherbot gopherbot removed the CherryPickCandidate label Feb 25, 2021
Copy link

@gopherbot gopherbot commented Feb 25, 2021

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

Copy link

@gopherbot gopherbot commented Mar 1, 2021

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

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
TryBot-Result: Go Bot <>
Trust: Matthew Dempsky <>
Run-TryBot: Matthew Dempsky <>
Reviewed-by: Cuong Manh Le <>
Reviewed-by: David Chase <>
@toothrot toothrot removed this from the Go1.16.1 milestone Mar 10, 2021
@toothrot toothrot added this to the Go1.16.2 milestone 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.
CherryPickApproved FrozenDueToAge
None yet

No branches or pull requests

5 participants