This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Go patch committed: Don't crash adding multiple value function calls
- From: Ian Lance Taylor <iant at google dot com>
- To: gcc-patches at gcc dot gnu dot org, gofrontend-dev at googlegroups dot com
- Date: Tue, 04 Jan 2011 14:37:27 -0800
- Subject: 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();
}