Interface embedding just means copying the interface methods, so there
is nothing wrong with embedding the empty interface more than once.
This patch fixes the gccgo frontend to permit that.  Bootstrapped and
ran Go testsuite on x86_64-unknown-linux-gnu.  Committed to mainline.

Ian

diff -r 34a3fad98e88 go/types.cc
--- a/go/types.cc	Fri Feb 17 15:35:50 2012 -0800
+++ b/go/types.cc	Fri Feb 17 16:41:16 2012 -0800
@@ -6471,7 +6471,7 @@
 	}
 
       Named_type* nt = t->named_type();
-      if (nt != NULL)
+      if (nt != NULL && it->parse_methods_ != NULL)
 	{
 	  std::vector<Named_type*>::const_iterator q;
 	  for (q = seen.begin(); q != seen.end(); ++q)

Reply via email to