This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Go patch committed: Don't crash adding multiple value function calls


This patch to the Go frontend avoids a crash when doing a binary
operation on two function calls which return multiple results.
Bootstrapped and tested on x86_64-unknown-linux-gnu.  Committed to
mainline.

Ian

diff -r 038b6ab8c6a5 go/types.cc
--- a/go/types.cc	Tue Jan 04 14:17:55 2011 -0800
+++ b/go/types.cc	Tue Jan 04 14:34:43 2011 -0800
@@ -401,6 +401,11 @@
       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();
     }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]