diff --git a/src/cmd/cgo/gcc.go b/src/cmd/cgo/gcc.go index 6cfd4d4646f..3f62c4d6954 100644 --- a/src/cmd/cgo/gcc.go +++ b/src/cmd/cgo/gcc.go @@ -419,8 +419,8 @@ func (p *Package) rewriteRef(f *File) { n.AddError = true n.Mangle = "_C2func_" + n.Go f.Name["2"+r.Name.Go] = n - expr = ast.NewIdent(n.Mangle) } + expr = ast.NewIdent(n.Mangle) r.Name = n break }