This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Go patch committed: Fix determination of complex argument types
- 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: Fri, 21 Sep 2012 23:02:56 -0700
- Subject: Go patch committed: Fix determination of complex argument types
This patch to the Go frontend fixes a dumb error that was preventing the
correct determination of argument types to the builtin complex function.
Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu.
Committed to mainline and 4.7 branch.
Ian
diff -r 293c1db1ef35 go/expressions.cc
--- a/go/expressions.cc Fri Sep 21 18:14:07 2012 -0700
+++ b/go/expressions.cc Fri Sep 21 23:00:15 2012 -0700
@@ -7476,7 +7476,7 @@
if (args != NULL && args->size() == 2)
{
Type* t1 = args->front()->type();
- Type* t2 = args->front()->type();
+ Type* t2 = args->back()->type();
if (!t1->is_abstract())
arg_type = t1;
else if (!t2->is_abstract())