diff mbox series

Go patch committed: Preserve nointerface property when inlining methods

Message ID CAOyqgcXafzR9MqVwmW==jbRmNF2cxyt+9WYXY1yn-4Bz9wbSiw@mail.gmail.com
State New
Headers show
Series Go patch committed: Preserve nointerface property when inlining methods | expand

Commit Message

Ian Lance Taylor March 15, 2019, 4:58 p.m. UTC
This patch by Than McIntosh fixes the Go frontend to preserve the
nointerface property when inlining method bodies.  This fixes
https://golang.org/issue/30862.  Bootstrapped and ran Go tests on
x86_64-pc-linux-gnu.  Committed to mainline.

Ian
diff mbox series

Patch

Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE	(revision 269710)
+++ gcc/go/gofrontend/MERGE	(working copy)
@@ -1,4 +1,4 @@ 
-a99959e6a4a899cfcc4d46e6b54da15d23c58a14
+cc70be24502faeffefb66fd0abeb7f20a6c7792a
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: gcc/go/gofrontend/gogo.cc
===================================================================
--- gcc/go/gofrontend/gogo.cc	(revision 269619)
+++ gcc/go/gofrontend/gogo.cc	(working copy)
@@ -6899,6 +6899,8 @@  Function_declaration::import_function_bo
 
   if (fntype->is_method())
     {
+      if (this->nointerface())
+        fn->set_nointerface();
       const Typed_identifier* receiver = fntype->receiver();
       Variable* recv_param = new Variable(receiver->type(), NULL, false,
 					  true, true, start_loc);