compiler: Record each import as a distinct alias.
commit5341cfc83b24a8b14f0a23a30df1e6dbd9c218bf
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 6 Oct 2015 21:24:17 +0000 (6 21:24 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 6 Oct 2015 21:24:17 +0000 (6 21:24 +0000)
treecc6ac014c96105160ab6f60ebc7049572c39490a
parent9a0ecfba93a5ac50cf21cbbe524e06d5f47e99bb
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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228550 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/gogo.cc
gcc/go/gofrontend/gogo.h
gcc/go/gofrontend/parse.cc
gcc/go/gofrontend/unsafe.cc
gcc/testsuite/go.test/test/fixedbugs/issue5957.dir/c.go
gcc/testsuite/go.test/test/import4.dir/import4.go