cmd/gc: preserve qualified names of unexported methods in imports.

Fixes #6295.

LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/20850043
diff --git a/test/fixedbugs/issue6295.go b/test/fixedbugs/issue6295.go
new file mode 100644
index 0000000..b8da212
--- /dev/null
+++ b/test/fixedbugs/issue6295.go
@@ -0,0 +1,10 @@
+// compiledir
+
+// Copyright 2013 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.
+
+// Issue 6295: qualified name of unexported methods
+// is corrupted during import.
+
+package ignored