aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/go.test
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2015-10-06 21:24:17 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2015-10-06 21:24:17 +0000
commitc12df35927747bd91c0a2d0ffce030f2cdb9f722 (patch)
treecc6ac014c96105160ab6f60ebc7049572c39490a /gcc/testsuite/go.test
parentce9f2dc532f64c01d284ac34ff3ed8f8f49220c5 (diff)
downloadgcc-c12df35927747bd91c0a2d0ffce030f2cdb9f722.zip
gcc-c12df35927747bd91c0a2d0ffce030f2cdb9f722.tar.gz
gcc-c12df35927747bd91c0a2d0ffce030f2cdb9f722.tar.bz2
compiler: Record each import as a distinct alias.
This patch introduces the Package_alias class which is a finer representation of the different between a package and the aliases it is imported under. Each alias keeps track of the location of its import statement and how many times that alias has been used. This allows the gofrontend to report when a specific import has not been used even if a symbol from the package has been used by another import. Fixes golang/go#12326. Reviewed-on: https://go-review.googlesource.com/14259 From-SVN: r228550
Diffstat (limited to 'gcc/testsuite/go.test')
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5957.dir/c.go2
-rw-r--r--gcc/testsuite/go.test/test/import4.dir/import4.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5957.dir/c.go b/gcc/testsuite/go.test/test/fixedbugs/issue5957.dir/c.go
index a1781d4..d115eac 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/issue5957.dir/c.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5957.dir/c.go
@@ -2,7 +2,7 @@ package p
import (
"./a" // ERROR "imported and not used: \x22a\x22 as surprise|imported and not used: surprise"
- "./b" // GC_ERROR "imported and not used: \x22b\x22 as surprise2|imported and not used: surprise2"
+ "./b" // ERROR "imported and not used: \x22b\x22 as surprise2|imported and not used: surprise2"
b "./b" // ERROR "imported and not used: \x22b\x22$|imported and not used: surprise2"
foo "math" // ERROR "imported and not used: \x22math\x22 as foo|imported and not used: math"
"fmt" // actually used
diff --git a/gcc/testsuite/go.test/test/import4.dir/import4.go b/gcc/testsuite/go.test/test/import4.dir/import4.go
index f92c663..b9f973f 100644
--- a/gcc/testsuite/go.test/test/import4.dir/import4.go
+++ b/gcc/testsuite/go.test/test/import4.dir/import4.go
@@ -18,7 +18,7 @@ import X "math" // ERROR "imported and not used.*math"
import . "bufio" // ERROR "imported and not used.*bufio"
// again, package without anything in it
-import "./empty" // GC_ERROR "imported and not used.*empty"
-import Z "./empty" // GC_ERROR "imported and not used.*empty"
+import "./empty" // ERROR "imported and not used.*empty"
+import Z "./empty" // ERROR "imported and not used.*empty"
import . "./empty" // ERROR "imported and not used.*empty"