Change information
Commit message:
cmd/compile: fix ICE when compiling global a, b = f()
CL 327651 rewrites a, b = f() to use temporaries when types are not
identical. That would leave OAS2 node appears in body of init function
for global variables initialization. The staticinit pass is not updated
to handle OAS2 node, causing ICE when compiling global variables.
To fix this, handle OAS2 nodes like other OAS2*, since they mostly
necessitate dynamic execution anyway.
Fixes #68264
Change-Id: I1eff8cc3e47035738a2c70d3169e35ec36ee9242
Files:
- M src/cmd/compile/internal/staticinit/sched.go
- A test/fixedbugs/issue68264.go
Change size: S
Delta: 2 files changed, 29 insertions(+), 0 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Code-Review: +2 by Cherry Mui, +2 by Than McIntosh
TryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI