aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/expand_calls.go
diff options
context:
space:
mode:
authorCuong Manh Le <cuong.manhle.vn@gmail.com>2020-11-20 14:09:01 +0700
committerCuong Manh Le <cuong.manhle.vn@gmail.com>2020-11-20 17:31:50 +0000
commitc306fd6d0b208f67208fb4a1b5bb82e0338a080c (patch)
tree3ba89bd0ab199836685244ebef79b83215e257b8 /src/cmd/compile/internal/ssa/expand_calls.go
parent5e58ae43bedeae5964e668755049088938320740 (diff)
downloadgo-c306fd6d0b208f67208fb4a1b5bb82e0338a080c.tar.gz
go-c306fd6d0b208f67208fb4a1b5bb82e0338a080c.zip
cmd/compile: allow loading single field of typed-interface{} OpIData
Same reason as CL 270057, but for OpLoad. Fixes #42727 Change-Id: Iebb1a8110f29427a0aed3b5e3e84f0540de3d1b7 Reviewed-on: https://go-review.googlesource.com/c/go/+/271906 Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src/cmd/compile/internal/ssa/expand_calls.go')
-rw-r--r--src/cmd/compile/internal/ssa/expand_calls.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/ssa/expand_calls.go b/src/cmd/compile/internal/ssa/expand_calls.go
index 3681af6599..180afab33b 100644
--- a/src/cmd/compile/internal/ssa/expand_calls.go
+++ b/src/cmd/compile/internal/ssa/expand_calls.go
@@ -247,7 +247,7 @@ func expandCalls(f *Func) {
// i.e., the struct select is generated and remains in because it is not applied to an actual structure.
// The OpLoad was created to load the single field of the IData
// This case removes that StructSelect.
- if leafType != selector.Type {
+ if leafType != selector.Type && !selector.Type.IsEmptyInterface() { // empty interface for #42727
f.Fatalf("Unexpected Load as selector, leaf=%s, selector=%s\n", leaf.LongString(), selector.LongString())
}
leaf.copyOf(selector)