aboutsummaryrefslogtreecommitdiff
path: root/src/cmd
diff options
context:
space:
mode:
authorzhouguangyuan <zhouguangyuan.xian@gmail.com>2022-05-01 00:11:13 +0800
committerGopher Robot <gobot@golang.org>2022-05-03 19:04:56 +0000
commit884530b374501b997422d08833c2a21966bd1069 (patch)
treed04b8c2450e4f489c6a144bd91f52d06d1ecf891 /src/cmd
parent5a103ca5e9e67414f5307b3993c1c34e531b26a8 (diff)
downloadgo-884530b374501b997422d08833c2a21966bd1069.tar.xz
cmd/compile: mark shape type dupok
Fixes #52633 Change-Id: I3f19804cd7c00cee7e365062402c264d84b596c1 Reviewed-on: https://go-review.googlesource.com/c/go/+/403316 Reviewed-by: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Keith Randall <khr@google.com> Auto-Submit: Keith Randall <khr@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Run-TryBot: guangyuan zhou <zhouguangyuan@golangcn.org>
Diffstat (limited to 'src/cmd')
-rw-r--r--src/cmd/compile/internal/reflectdata/reflect.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/compile/internal/reflectdata/reflect.go b/src/cmd/compile/internal/reflectdata/reflect.go
index a9f87baee2..d6e6b115a4 100644
--- a/src/cmd/compile/internal/reflectdata/reflect.go
+++ b/src/cmd/compile/internal/reflectdata/reflect.go
@@ -1199,10 +1199,10 @@ func writeType(t *types.Type) *obj.LSym {
// Note: DUPOK is required to ensure that we don't end up with more
// than one type descriptor for a given type, if the type descriptor
- // can be defined in multiple packages, that is, unnamed types and
- // instantiated types.
+ // can be defined in multiple packages, that is, unnamed types,
+ // instantiated types and shape types.
dupok := 0
- if tbase.Sym() == nil || tbase.IsFullyInstantiated() {
+ if tbase.Sym() == nil || tbase.IsFullyInstantiated() || tbase.HasShape() {
dupok = obj.DUPOK
}