]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: in expand calls, preserve pointer store type but decompose aggregate...
authorCherry Zhang <cherryyz@google.com>
Thu, 1 Apr 2021 18:21:12 +0000 (14:21 -0400)
committerCherry Zhang <cherryyz@google.com>
Fri, 2 Apr 2021 00:45:56 +0000 (00:45 +0000)
commit5579ee169f12815660eb9ee66afd5f2abc77864f
tree8d3b674d623839c26c85ffe5c6ab2b35de1f07c5
parent27d306281c54a89ff00e3dad6f4cea790a2f2f2d
cmd/compile: in expand calls, preserve pointer store type but decompose aggregate args

In CL 305672 we preserve the pointer type of a store by just not
decomposing it. But this can be problematic when the source of
the store is a direct interface aggregate type (e.g.
struct { x map[int]int }.

In this CL we take a different approach: we preserve the store
type when generating the new store, but also decompose the source.

Fixes #45344.

Change-Id: If5dd496458dee95aa649c6d106b96a6cdcf3e60d
Reviewed-on: https://go-review.googlesource.com/c/go/+/306669
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/ssa/expand_calls.go
test/fixedbugs/issue45344.go [new file with mode: 0644]