public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* libgo patch committed: Handle DW_AT_specification in cgo
@ 2015-11-20 23:28 Ian Lance Taylor
  0 siblings, 0 replies; only message in thread
From: Ian Lance Taylor @ 2015-11-20 23:28 UTC (permalink / raw)
  To: gcc-patches, gofrontend-dev

[-- Attachment #1: Type: text/plain, Size: 319 bytes --]

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

[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1054 bytes --]

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__") {

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-11-20 22:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-20 23:28 libgo patch committed: Handle DW_AT_specification in cgo Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).