]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.19] cmd/compile: fix missing walk pass for static initialization...
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Sat, 8 Oct 2022 05:32:06 +0000 (12:32 +0700)
committerHeschi Kreinick <heschi@google.com>
Mon, 24 Oct 2022 19:05:12 +0000 (19:05 +0000)
commit0618956b31e11072fcc21c8e9488a7a731482c0b
tree425eb9ddb8ff702d15b21037c21aedf6e83f97eb
parente73130cf45dbc8cf6e3074b4cda9674b18d82feb
[release-branch.go1.19] 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 #56106

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>
Reviewed-on: https://go-review.googlesource.com/c/go/+/441995
Reviewed-by: Joedian Reid <joedian@golang.org>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/walk/complit.go
test/fixedbugs/issue56105.go [new file with mode: 0644]