[go] cmd/compile: fix ICE when compiling global a, b = f()

0 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
6:45 AM (9 hours ago) 6:45 AM
to Cuong Manh Le, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Than McIntosh, Go LUCI, Cherry Mui, Keith Randall, golang-co...@googlegroups.com

Gopher Robot submitted the change

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
Reviewed-by: Than McIntosh <th...@google.com>
Reviewed-by: Cherry Mui <cher...@google.com>
Auto-Submit: Cuong Manh Le <cuong.m...@gmail.com>
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:
  • requirement satisfiedCode-Review: +2 by Cherry Mui, +2 by Than McIntosh
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I1eff8cc3e47035738a2c70d3169e35ec36ee9242
Gerrit-Change-Number: 596055
Gerrit-PatchSet: 5
Gerrit-Owner: Cuong Manh Le <cuong.m...@gmail.com>
Gerrit-Reviewer: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: Cuong Manh Le <cuong.m...@gmail.com>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Keith Randall <k...@golang.org>
Gerrit-Reviewer: Than McIntosh <th...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages