OSDN Git Service

compiler: Fix determining types for builtin complex function.
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 22 Sep 2012 06:02:51 +0000 (06:02 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 22 Sep 2012 06:02:51 +0000 (06:02 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@191631 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/go/gofrontend/expressions.cc

index 19acda6..dffd193 100644 (file)
@@ -7482,7 +7482,7 @@ Builtin_call_expression::do_determine_type(const Type_context* context)
        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())