]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: fix inlining function has shape in type
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Sat, 14 May 2022 09:15:26 +0000 (16:15 +0700)
committerCuong Manh Le <cuong.manhle.vn@gmail.com>
Sat, 14 May 2022 15:26:27 +0000 (15:26 +0000)
commit19156a54741d4f353c9e8e0860197ca95a6ee6ca
treeccad3066ac559dddaba0aa586b07aa7c285061ee
parent3474cd4eee82ac442618391f8bc4a70d7b1cb65a
cmd/compile: fix inlining function has shape in type

CL 395854 made inline pass to not inlining function with shape params,
but pass no shape arguments. But it does not consider the case where
function has shape params, but passing zero arguments. In this case, the
un-safe interface conversion that may be applied to a shape argument can
not happen, so it's safe to inline the function.

Fixes #52907

Change-Id: Ifa7b23709bb47b97e27dc1bf32343d92683ef783
Reviewed-on: https://go-review.googlesource.com/c/go/+/406176
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/inline/inl.go
test/fixedbugs/issue52907.go [new file with mode: 0644]