]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix missing walk pass for static initialization slice
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Sat, 8 Oct 2022 05:32:06 +0000 (12:32 +0700)
committerGopher Robot <gobot@golang.org>
Mon, 10 Oct 2022 21:39:15 +0000 (21:39 +0000)
commitfce449680a241a283f7661edb94eef5427bf595c
tree2304120c23136698061ae7ec74f17c1ca71d10fc
parent506e690a26390d137b8bfc01d90121581c3d6f7a
cmd/compile: fix missing walk pass for static initialization slice

CL 403995 fixed static init of literal contains dynamic exprs, by
ensuring their init are ordered properly. However, we still need to walk
the generated init codes before appending to parent init. Otherwise,
codes that requires desugaring will be unhandled, causing the compiler
backend crashing.

Fixes #56105

Change-Id: Ic25fd4017473f5412c8e960a91467797a234edfd
Reviewed-on: https://go-review.googlesource.com/c/go/+/440455
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/walk/complit.go
test/fixedbugs/issue56105.go [new file with mode: 0644]