]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR go/68072
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 20 Nov 2015 22:48:47 +0000 (22:48 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 20 Nov 2015 22:48:47 +0000 (22:48 +0000)
    cmd/cgo: ignore vars with no name or type if they have a AttrSpecification

    Backport of master CL https://golang.org/cl/17151.

    Fixes https://gcc.gnu.org/PR/68072.

    Reviewed-on: https://go-review.googlesource.com/17152

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230685 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/go/gofrontend/MERGE
libgo/go/cmd/cgo/gcc.go

index 418f37a1542804730ee0164ae639231b1d24a871..186385433d92a284955a314be309d62782ec4cc3 100644 (file)
@@ -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 b64849a8d16f37f577cad456b40b8822f4371b6c..e0b89ec14cb78232a39a673be3d3b5a6f5fb0e27 100644 (file)
@@ -490,6 +490,11 @@ func (p *Package) loadDWARF(f *File, names []*Name) {
                        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__") {