diff options
Diffstat (limited to 'src/cmd/compile/internal/walk/order.go')
-rw-r--r-- | src/cmd/compile/internal/walk/order.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/walk/order.go b/src/cmd/compile/internal/walk/order.go index 179fbdb..de180a4 100644 --- a/src/cmd/compile/internal/walk/order.go +++ b/src/cmd/compile/internal/walk/order.go @@ -643,7 +643,12 @@ func (o *orderState) stmt(n ir.Node) { indexLHS.Index = o.cheapExpr(indexLHS.Index) call := n.Y.(*ir.CallExpr) - indexRHS := call.Args[0].(*ir.IndexExpr) + arg0 := call.Args[0] + // ir.SameSafeExpr skips OCONVNOPs, so we must do the same here (#66096). + for arg0.Op() == ir.OCONVNOP { + arg0 = arg0.(*ir.ConvExpr).X + } + indexRHS := arg0.(*ir.IndexExpr) indexRHS.X = indexLHS.X indexRHS.Index = indexLHS.Index |