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())

Reply via email to