The earlydebug work has caused https://gcc.gnu.org/PR68072 when using the cgo tool. The patch to fix this in the master sources is https://golang.org/cl/17151 . This patch fixes the problem in the gccgo sources. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline and GCC 5 branch.
Ian
Index: gcc/go/gofrontend/MERGE =================================================================== --- gcc/go/gofrontend/MERGE (revision 230677) +++ gcc/go/gofrontend/MERGE (working copy) @@ -1,4 +1,4 @@ -d52835c9376985f92f35c32af5f1808239981536 +128d5b14b8ab967cb61c01a9b2c596bda7d04c63 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/gcc.go =================================================================== --- libgo/go/cmd/cgo/gcc.go (revision 230463) +++ libgo/go/cmd/cgo/gcc.go (working copy) @@ -490,6 +490,11 @@ func (p *Package) loadDWARF(f *File, nam name, _ := e.Val(dwarf.AttrName).(string) typOff, _ := e.Val(dwarf.AttrType).(dwarf.Offset) if name == "" || typOff == 0 { + if e.Val(dwarf.AttrSpecification) != nil { + // Since we are reading all the DWARF, + // assume we will see the variable elsewhere. + break + } fatalf("malformed DWARF TagVariable entry") } if !strings.HasPrefix(name, "__cgo__") {