aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/walk/order.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/compile/internal/walk/order.go')
-rw-r--r--src/cmd/compile/internal/walk/order.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/cmd/compile/internal/walk/order.go b/src/cmd/compile/internal/walk/order.go
index c5fd0c1e1d..6e336f565c 100644
--- a/src/cmd/compile/internal/walk/order.go
+++ b/src/cmd/compile/internal/walk/order.go
@@ -1166,11 +1166,7 @@ func (o *orderState) expr1(n, lhs ir.Node) ir.Node {
if n.X.Type().IsInterface() {
return n
}
- to := n.Type()
- if n.Op() == ir.OCONVIDATA {
- to = types.NewInterface(types.LocalPkg, nil)
- }
- if _, _, needsaddr := convFuncName(n.X.Type(), to); needsaddr || isStaticCompositeLiteral(n.X) {
+ if _, _, needsaddr := dataWordFuncName(n.X.Type()); needsaddr || isStaticCompositeLiteral(n.X) {
// Need a temp if we need to pass the address to the conversion function.
// We also process static composite literal node here, making a named static global
// whose address we can put directly in an interface (see OCONVIFACE/OCONVIDATA case in walk).