From: Than McIntosh Date: Tue, 6 Nov 2018 20:07:46 +0000 (-0500) Subject: cmd/cgo: fix typo in gccgo name mangling recipe X-Git-Tag: go1.12beta1~372 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=43edf21eff83e95b32cc43453c3a8df816d85e88;p=gostls13.git cmd/cgo: fix typo in gccgo name mangling recipe The code to implement new-style gccgo name mangling had a recipe that didn't quite match that of the compiler (incorrect handling for '.'). This showed up as a failure in the gotools cgo test if the directory containing the test run included a "." character. [This is a copy of https://golang.org/cl/147917]. Change-Id: Ia94728ecead879c8d223eb6cee6c102a8af1c86e Reviewed-on: https://go-review.googlesource.com/c/147937 Reviewed-by: Cherry Zhang --- diff --git a/src/cmd/cgo/out.go b/src/cmd/cgo/out.go index c203873b13..bc0b0b6387 100644 --- a/src/cmd/cgo/out.go +++ b/src/cmd/cgo/out.go @@ -1271,7 +1271,7 @@ func gccgoPkgpathToSymbolNew(ppath string) string { for _, c := range []byte(ppath) { switch { case 'A' <= c && c <= 'Z', 'a' <= c && c <= 'z', - '0' <= c && c <= '9', '_' == c: + '0' <= c && c <= '9', c == '_', c == '.': bsl = append(bsl, c) default: changed = true