case ir.OAS:
                n := n.(*ir.AssignStmt)
                lhs, rhs = []ir.Node{n.X}, n.Y
+       case ir.OAS2:
+               // Usually OAS2 has been rewritten to separate OASes by types2.
+               // What's left here is "var a, b = tmp1, tmp2" as a result from rewriting
+               // "var a, b = f()" that needs type conversion, which is not static.
+               n := n.(*ir.AssignListStmt)
+               for _, rhs := range n.Rhs {
+                       for rhs.Op() == ir.OCONVNOP {
+                               rhs = rhs.(*ir.ConvExpr).X
+                       }
+                       if name, ok := rhs.(*ir.Name); !ok || !name.AutoTemp() {
+                               base.FatalfAt(n.Pos(), "unexpected rhs, not an autotmp: %+v", rhs)
+                       }
+               }
+               return false
        case ir.OAS2DOTTYPE, ir.OAS2FUNC, ir.OAS2MAPR, ir.OAS2RECV:
                n := n.(*ir.AssignListStmt)
                if len(n.Lhs) < 2 || len(n.Rhs) != 1 {
 
--- /dev/null
+// compile
+
+// Copyright 2024 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+type nat []int
+
+var a, b nat = y()
+
+func y() (nat, []int) {
+       return nat{0}, nat{1}
+}