Index: gcc/go/gofrontend/MERGE =================================================================== --- gcc/go/gofrontend/MERGE (revision 229636) +++ gcc/go/gofrontend/MERGE (working copy) @@ -1,4 +1,4 @@ -1c1f226662a6c84eae83f8aaec3d4503e70be843 +65ff1d5fb581717229e5c02796d719671a1e8628 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. Index: gcc/go/gofrontend/expressions.cc =================================================================== --- gcc/go/gofrontend/expressions.cc (revision 229541) +++ gcc/go/gofrontend/expressions.cc (working copy) @@ -8608,6 +8608,16 @@ Builtin_call_expression::do_export(Expor int Call_expression::do_traverse(Traverse* traverse) { + // If we are calling a function in a different package that returns + // an unnamed type, this may be the only chance we get to traverse + // that type. We don't traverse this->type_ because it may be a + // Call_multiple_result_type that will just lead back here. + if (this->type_ != NULL && !this->type_->is_error_type()) + { + Function_type *fntype = this->get_function_type(); + if (fntype != NULL && Type::traverse(fntype, traverse) == TRAVERSE_EXIT) + return TRAVERSE_EXIT; + } if (Expression::traverse(&this->fn_, traverse) == TRAVERSE_EXIT) return TRAVERSE_EXIT; if (this->args_ != NULL)