]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: fix linux-amd64-noopt builder
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Mon, 3 May 2021 07:10:23 +0000 (14:10 +0700)
committerCuong Manh Le <cuong.manhle.vn@gmail.com>
Mon, 3 May 2021 17:49:50 +0000 (17:49 +0000)
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>
src/cmd/compile/internal/walk/walk.go

index 904587295a62dca135b99831c09dafeec30c26a0..fe2c62cd4f8ec1480dfc696eeb63cf597c72972a 100644 (file)
@@ -308,7 +308,8 @@ func mayCall(n ir.Node) bool {
                default:
                        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
 
                case ir.OINDEX, ir.OSLICE, ir.OSLICEARR, ir.OSLICE3, ir.OSLICE3ARR, ir.OSLICESTR,