diff --git a/src/cmd/compile/internal/ssa/value.go b/src/cmd/compile/internal/ssa/value.go index 286edc0cda..04ea17cce9 100644 --- a/src/cmd/compile/internal/ssa/value.go +++ b/src/cmd/compile/internal/ssa/value.go @@ -48,6 +48,9 @@ type Value struct { // short form print. Just v#. func (v *Value) String() string { + if v == nil { + return "nil" // should never happen, but not panicking helps with debugging + } return fmt.Sprintf("v%d", v.ID) }