diff options
author | Cuong Manh Le <cuong.manhle.vn@gmail.com> | 2020-11-20 14:09:01 +0700 |
---|---|---|
committer | Cuong Manh Le <cuong.manhle.vn@gmail.com> | 2020-11-20 17:31:50 +0000 |
commit | c306fd6d0b208f67208fb4a1b5bb82e0338a080c (patch) | |
tree | 3ba89bd0ab199836685244ebef79b83215e257b8 /src/cmd/compile/internal/ssa/expand_calls.go | |
parent | 5e58ae43bedeae5964e668755049088938320740 (diff) | |
download | go-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.go | 2 |
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) |