]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Don't finalize methods for a type more than once.
authorIan Lance Taylor <ian@gcc.gnu.org>
Tue, 21 Dec 2010 22:33:04 +0000 (22:33 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Tue, 21 Dec 2010 22:33:04 +0000 (22:33 +0000)
From-SVN: r168134

gcc/go/gofrontend/types.cc

index 97bde7bd6a5c71991c21405a12e2d19fd507d78b..11a561dac2d51e0892a4e9f3cd99d31b6ba0aa1d 100644 (file)
@@ -3698,6 +3698,8 @@ Struct_type::is_unexported_local_field(Gogo* gogo,
 void
 Struct_type::finalize_methods(Gogo* gogo)
 {
+  if (this->all_methods_ != NULL)
+    return;
   Type::finalize_methods(gogo, this, this->location_, &this->all_methods_);
 }
 
@@ -6615,6 +6617,9 @@ Named_type::is_unexported_local_method(Gogo* gogo,
 void
 Named_type::finalize_methods(Gogo* gogo)
 {
+  if (this->all_methods_ != NULL)
+    return;
+
   if (this->local_methods_ != NULL
       && (this->points_to() != NULL || this->interface_type() != NULL))
     {