cmd/compile: inlined initializer of blank variable fails on dev.regabi branch #43677
Comments
Change https://golang.org/cl/283537 mentions this issue: |
gopherbot
pushed a commit
that referenced
this issue
Jan 14, 2021
CL 278914 introduced NameOffsetExpr to avoid copying ONAME nodes and hacking up their offsets, but evidently staticinit subtly depended on the prior behavior to allow dynamic initialization of blank variables. This CL refactors the code somewhat to avoid using NameOffsetExpr with blank variables, and to instead create dynamic assignments directly to the global blank node. It also adds a check to NewNameOffsetExpr to guard against misuse like this, since I suspect there could be other cases still lurking within staticinit. (This code is overdue for an makeover anyway.) Thanks to thanm@ for bisect and test case minimization. Fixes #43677. Change-Id: Ic71cb5d6698382feb9548dc3bb9fd606b207a172 Reviewed-on: https://go-review.googlesource.com/c/go/+/283537 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com>
This is fixed on dev.regabi now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@thanm reports that the dev.regabi compiler fails to build k8s after ffb0cb7 (CL 278914). Minimized test case is:
The text was updated successfully, but these errors were encountered: