mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: fix linux-amd64-noopt builder
CL 312214 added unsafe.{Add,Slice}, which may appears in expression that
evaluating requires function calls. "mayCall" does not handle that
case, causing linux-amd64-noopt builder failed.
Fixes #45917
Change-Id: I900aefb702122480be621355def3d2c20eadbe70
Reviewed-on: https://go-review.googlesource.com/c/go/+/316170
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
90ec257735
commit
7f9febd4a1
1 changed files with 2 additions and 1 deletions
|
|
@ -308,7 +308,8 @@ func mayCall(n ir.Node) bool {
|
||||||
default:
|
default:
|
||||||
base.FatalfAt(n.Pos(), "mayCall %+v", n)
|
base.FatalfAt(n.Pos(), "mayCall %+v", n)
|
||||||
|
|
||||||
case ir.OCALLFUNC, ir.OCALLMETH, ir.OCALLINTER:
|
case ir.OCALLFUNC, ir.OCALLMETH, ir.OCALLINTER,
|
||||||
|
ir.OUNSAFEADD, ir.OUNSAFESLICE:
|
||||||
return true
|
return true
|
||||||
|
|
||||||
case ir.OINDEX, ir.OSLICE, ir.OSLICEARR, ir.OSLICE3, ir.OSLICE3ARR, ir.OSLICESTR,
|
case ir.OINDEX, ir.OSLICE, ir.OSLICEARR, ir.OSLICE3, ir.OSLICE3ARR, ir.OSLICESTR,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue