[gcc/devel/c++-modules] gotest: explicitly skip type descriptors

Nathan Sidwell nathan@gcc.gnu.org
Fri Jan 24 14:39:00 GMT 2020


https://gcc.gnu.org/g:92bea423c295f5c6c9b0cf06a5a555011cc98bdc

commit 92bea423c295f5c6c9b0cf06a5a555011cc98bdc
Author: Ian Lance Taylor <iant@golang.org>
Date:   Wed Jan 22 15:52:23 2020 -0800

    gotest: explicitly skip type descriptors
    
    Type descriptors are normally weak and nm will report them as V,
    so we will skip them when collecting the list of symbols.
    But when not using GNU nm, they may be reported as D,
    so also skip them in symstogo.
    
    This fixes go/doc/check on Solaris.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/215900

Diff:
---
 gcc/go/gofrontend/MERGE | 2 +-
 libgo/testsuite/gotest  | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index a778a85..a8ba3af 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-1d64b76f559c0969ee2a6eb8e0ac9d268713880c
+7d3081ce69dda123d77e35e8b9d282e40e9465e2
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
diff --git a/libgo/testsuite/gotest b/libgo/testsuite/gotest
index de4a392..33f99d7 100755
--- a/libgo/testsuite/gotest
+++ b/libgo/testsuite/gotest
@@ -517,6 +517,11 @@ symtogo() {
     if expr "$tp" : '^\.' >/dev/null 2>&1; then
       continue
     fi
+    # Skip type descriptors.  These are normally skipped because they
+    # are weak symbols, but if not using GNU nm we may see them here.
+    if expr "$tp" : '^type\.\.' >/dev/null 2>&1; then
+      continue
+    fi
     s=$(echo "$tp" | sed -e 's/\.\.z2f/%/g' | sed -e 's/.*%//')
     # Screen out methods (X.Y.Z).
     if ! expr "$s" : '^[^.]*\.[^.]*$' >/dev/null 2>&1; then



More information about the Gcc-cvs mailing list