]> Cypherpunks repositories - gostls13.git/commitdiff
gc: fix %N for OGOTO nodes.
authorLuuk van Dijk <lvd@golang.org>
Tue, 5 Jul 2011 22:02:03 +0000 (00:02 +0200)
committerLuuk van Dijk <lvd@golang.org>
Tue, 5 Jul 2011 22:02:03 +0000 (00:02 +0200)
6g -W crashed on any source with a goto. this fixes that.

R=rsc, r
CC=golang-dev
https://golang.org/cl/4675052

src/cmd/gc/subr.c

index 7c472147a2591a8925ed2300867c7df91d1d7fcc..40b0c4fd15b3a6c898a273b558389439d104812c 100644 (file)
@@ -1124,7 +1124,7 @@ Sconv(Fmt *fp)
                return 0;
        }
 
-       if(s->pkg != localpkg || longsymnames || (fp->flags & FmtLong)) {
+       if(s->pkg && s->pkg != localpkg || longsymnames || (fp->flags & FmtLong)) {
                // This one is for the user.  If the package name
                // was used by multiple packages, give the full
                // import path to disambiguate.