aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuuk van Dijk <lvd@golang.org>2011-07-06 00:02:03 +0200
committerLuuk van Dijk <lvd@golang.org>2011-07-06 00:02:03 +0200
commit13d048a2219f422202f4dad108734b24c0b32cac (patch)
tree2b485e1aceadd34b910fe4238959dc1ac1b05925
parenteea5443572e7a10b7133f199be2551756e157865 (diff)
downloadgo-13d048a2219f422202f4dad108734b24c0b32cac.tar.gz
go-13d048a2219f422202f4dad108734b24c0b32cac.zip
gc: fix %N for OGOTO nodes.
6g -W crashed on any source with a goto. this fixes that. R=rsc, r CC=golang-dev https://golang.org/cl/4675052
-rw-r--r--src/cmd/gc/subr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/gc/subr.c b/src/cmd/gc/subr.c
index 7c472147a2..40b0c4fd15 100644
--- a/src/cmd/gc/subr.c
+++ b/src/cmd/gc/subr.c
@@ -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.