This libgo patch by Than McIntosh updates cgo's
gccgoPkgpathToSymbolNew() to bring it into conformance with the way
that gccgo now handles package paths with embedded dots (see
https://golang.org/cl/200838).  See also https://gcc.gnu.org/PR61880,
a related bug.  This patch is a copy of https://golang.org/cl/207957
in the main Go repo.  This is for https://golang.org/issue/35623.
Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.  Committed
to mainline.

Ian
Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE     (revision 278316)
+++ gcc/go/gofrontend/MERGE     (working copy)
@@ -1,4 +1,4 @@
-25d5e9dca49ad3f49393b254dd87f8df51487c65
+245904ac148f15db530fb8d50f526c47d08024c5
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: libgo/go/cmd/cgo/out.go
===================================================================
--- libgo/go/cmd/cgo/out.go     (revision 277299)
+++ libgo/go/cmd/cgo/out.go     (working copy)
@@ -1318,8 +1318,10 @@ func gccgoPkgpathToSymbolNew(ppath strin
        for _, c := range []byte(ppath) {
                switch {
                case 'A' <= c && c <= 'Z', 'a' <= c && c <= 'z',
-                       '0' <= c && c <= '9', c == '_', c == '.':
+                       '0' <= c && c <= '9', c == '_':
                        bsl = append(bsl, c)
+               case c == '.':
+                       bsl = append(bsl, ".x2e"...)
                default:
                        changed = true
                        encbytes := []byte(fmt.Sprintf("..z%02x", c))

Reply via email to