aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2010-12-21 22:33:04 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2010-12-21 22:33:04 +0000
commit31e1ba2e2a6419ce69489c63b57aa33bee12e280 (patch)
tree62e1ea3a47c81221025ba4a6c16d3cc01a393753
parent1588200e466807c36167e5f0a59f4bd4c183828a (diff)
downloadgcc-31e1ba2e2a6419ce69489c63b57aa33bee12e280.zip
gcc-31e1ba2e2a6419ce69489c63b57aa33bee12e280.tar.gz
gcc-31e1ba2e2a6419ce69489c63b57aa33bee12e280.tar.bz2
Don't finalize methods for a type more than once.
From-SVN: r168134
-rw-r--r--gcc/go/gofrontend/types.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/go/gofrontend/types.cc b/gcc/go/gofrontend/types.cc
index 97bde7b..11a561d 100644
--- a/gcc/go/gofrontend/types.cc
+++ b/gcc/go/gofrontend/types.cc
@@ -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))
{