From: Robert Griesemer Date: Thu, 3 Mar 2016 01:40:18 +0000 (-0800) Subject: cmd/compile: exit early if oldname doesn't find a name X-Git-Tag: go1.7beta1~1586 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=533f30b924ce150eddf0bea6746bc88631e4dde8;p=gostls13.git cmd/compile: exit early if oldname doesn't find a name Change-Id: I59ce1b40bc3472cc92a9a0a9fbd32342e0b945ad Reviewed-on: https://go-review.googlesource.com/20152 Reviewed-by: Matthew Dempsky --- diff --git a/src/cmd/compile/internal/gc/dcl.go b/src/cmd/compile/internal/gc/dcl.go index 893fb6bf69..11ce49f369 100644 --- a/src/cmd/compile/internal/gc/dcl.go +++ b/src/cmd/compile/internal/gc/dcl.go @@ -388,6 +388,7 @@ func oldname(s *Sym) *Node { n = newname(s) n.Op = ONONAME n.Name.Iota = iota_ // save current iota value in const declarations + return n } if Curfn != nil && n.Op == ONAME && n.Name.Funcdepth > 0 && n.Name.Funcdepth != Funcdepth {