compiler: preserve nointerface property when inlining methods
authorIan Lance Taylor <ian@gcc.gnu.org>
Fri, 15 Mar 2019 16:58:14 +0000 (16:58 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Fri, 15 Mar 2019 16:58:14 +0000 (16:58 +0000)
    When an inline function (with body) is imported from another package,
    make that the "nointerface" property (if set) is preserved.

    Fixes golang/go#30862.

    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/167742

From-SVN: r269713

gcc/go/gofrontend/MERGE
gcc/go/gofrontend/gogo.cc

index 18050a22b5e1ecf2bb08c12ff1d342ceb1641bf9..13c12e7de53c5e7cee1eaed48cd7cc4fde06694e 100644 (file)
@@ -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 757758e14fa42bb71ac5bf38656e701847c1d006..a9630b28bc0a07863883ee8f42e68e71d5c6766c 100644 (file)
@@ -6899,6 +6899,8 @@ Function_declaration::import_function_body(Gogo* gogo, Named_object* no)
 
   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);