]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: allow ir.OSLICE2ARRPTR in mayCall
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Sun, 13 Jun 2021 03:55:19 +0000 (10:55 +0700)
committerCuong Manh Le <cuong.manhle.vn@gmail.com>
Sun, 13 Jun 2021 05:50:15 +0000 (05:50 +0000)
commit67b1b6a2e3a405e3e0b5c6a76f702b2a6071c1f0
tree3701ca3518726118fb404c007dd5c52633c7cbe6
parent1ed0d129e9ba9b55e9ae36ac1d7f2766ba16b373
cmd/compile: allow ir.OSLICE2ARRPTR in mayCall

CL 301650 adds conversion from slice to array ptr. The conversion
expression may appear as argument to a function call, so it will be
tested by mayCall. But ir.OSLICE2ARRPTR  op is not handled by mayCall,
causes the compiler crashes.

Updates #395
Fixes #46720

Change-Id: I39e1b3e38e224a31f3dec46dbbdc855ff3b2c6a5
Reviewed-on: https://go-review.googlesource.com/c/go/+/327649
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Trust: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
src/cmd/compile/internal/walk/walk.go
test/fixedbugs/issue46720.go [new file with mode: 0644]