Go patch committed: Don't name type descriptor for alias type

Ian Lance Taylor iant@golang.org
Mon Dec 7 17:33:31 GMT 2020


This patch to the Go frontend avoids using an alias type name when
naming a type descriptor.  The test case for this
https://golang.org/cl/275632.  Bootstrapped and ran Go testsuite on
x86_64-pc-linux-gnu.  Committed to mainline.

Ian
-------------- next part --------------
47cf6054ce8d11aa681846d08433afdb4404abe7
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index 019aafdde9a..02083edeece 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-342e5f0b349553a69d7c99a18162ae2a1e6e5775
+2184750d74d37580486e90df1284c07fdee91670
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
diff --git a/gcc/go/gofrontend/names.cc b/gcc/go/gofrontend/names.cc
index 0097417cff0..8e73e5e157c 100644
--- a/gcc/go/gofrontend/names.cc
+++ b/gcc/go/gofrontend/names.cc
@@ -1017,7 +1017,7 @@ Gogo::type_descriptor_backend_name(const Type* type, Named_type* nt,
   bool is_pointer = false;
   if (nt == NULL && type->points_to() != NULL)
     {
-      nt = type->points_to()->named_type();
+      nt = type->points_to()->unalias()->named_type();
       is_pointer = true;
     }
 


More information about the Gcc-patches mailing list