aboutsummaryrefslogtreecommitdiff
path: root/src/encoding
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2021-02-17 17:49:40 -0800
committerMatthew Dempsky <mdempsky@google.com>2021-02-25 19:57:49 +0000
commit6c3bcda866582b51842d71576a11c0fe1b647a22 (patch)
tree77bfaf1a42dfa7d91481989c4bcaad5880a2cea7 /src/encoding
parent526ee96f4992ff3a1e1c219fe8dc9870098bacba (diff)
downloadgo-6c3bcda866582b51842d71576a11c0fe1b647a22.tar.xz
cmd/compile: declare inlined result params early 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 #44355. 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>
Diffstat (limited to 'src/encoding')
0 files changed, 0 insertions, 0 deletions