]> gcc.gnu.org Git - gcc.git/commitdiff
Don't crash on interface loop with forwarding types.
authorIan Lance Taylor <ian@gcc.gnu.org>
Tue, 15 Feb 2011 19:53:36 +0000 (19:53 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Tue, 15 Feb 2011 19:53:36 +0000 (19:53 +0000)
From-SVN: r170198

gcc/go/gofrontend/types.cc

index 16563bbdda94fea9baab4fd409793fb9400f1f6d..0d17ab4773fb5c9338adc8d6b35706b7a6d31101 100644 (file)
@@ -5659,7 +5659,7 @@ Interface_type::finalize_methods()
        {
          if (q->name().empty())
            {
-             if (q->type() == p->type())
+             if (q->type()->forwarded() == p->type()->forwarded())
                error_at(p->location(), "interface inheritance loop");
              else
                {
@@ -5667,7 +5667,8 @@ Interface_type::finalize_methods()
                  for (i = from + 1; i < this->methods_->size(); ++i)
                    {
                      const Typed_identifier* r = &this->methods_->at(i);
-                     if (r->name().empty() && r->type() == q->type())
+                     if (r->name().empty()
+                         && r->type()->forwarded() == q->type()->forwarded())
                        {
                          error_at(p->location(),
                                   "inherited interface listed twice");
This page took 0.081526 seconds and 5 git commands to generate.