Don't crash when adding function calls that return multiple results.
authorIan Lance Taylor <ian@gcc.gnu.org>
Tue, 4 Jan 2011 22:37:26 +0000 (22:37 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Tue, 4 Jan 2011 22:37:26 +0000 (22:37 +0000)
From-SVN: r168487

gcc/go/gofrontend/types.cc

index 02165371503aa33f7ad4c423c5652f1c6e3b8136..a8faa35e0f6d04c593c7074cd631713a76aded00 100644 (file)
@@ -401,6 +401,11 @@ Type::are_identical(const Type* t1, const Type* t2, bool errors_are_identical,
       return t1->interface_type()->is_identical(t2->interface_type(),
                                                errors_are_identical);
 
+    case TYPE_CALL_MULTIPLE_RESULT:
+      if (reason != NULL)
+       *reason = "invalid use of multiple value function call";
+      return false;
+
     default:
       gcc_unreachable();
     }