This patch to the Go frontend unaliases the receiver type when
outputting export data for a method.  This avoids a crash when
importing such a package.  The test case for this is
https://golang.org/cl/292009.  Bootstrapped and ran Go testsuite on
x86_64-pc-linux-gnu.  Committed to mainline.

Ian
91dbe2eee631df74bd96153aaf34d6f0da4b1a02
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index 3175ba0e005..eed9ce01905 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-a5d7c4225fbbd06b97db6fa424cc0cb5191082d4
+c406de0594782b1d6782a732a50f5b76387852dc
 
 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/gogo.cc b/gcc/go/gofrontend/gogo.cc
index 62b06be827b..38a2f6f8f9e 100644
--- a/gcc/go/gofrontend/gogo.cc
+++ b/gcc/go/gofrontend/gogo.cc
@@ -5898,7 +5898,7 @@ Function::export_func_with_type(Export* exp, const 
Named_object* no,
       exp->write_name(receiver->name());
       exp->write_escape(receiver->note());
       exp->write_c_string(" ");
-      exp->write_type(receiver->type());
+      exp->write_type(receiver->type()->unalias());
       exp->write_c_string(") ");
     }
 

Reply via email to