diff options
author | Yvan Roux <yvan.roux@linaro.org> | 2015-11-10 10:30:16 +0100 |
---|---|---|
committer | Yvan Roux <yvan.roux@linaro.org> | 2015-11-12 19:23:23 +0000 |
commit | 4c4566ae0c0962f52ccb4270c9c111dd17c6ac1a (patch) | |
tree | abe90f6ec33b35a2b3a11e80948f3951195d260f /gcc/go | |
parent | 9846c8ca894521dc270ac5f8df290a0ae2264a64 (diff) |
Merge branches/gcc-5-branch rev 230068.
Change-Id: I95e1aeee6fd98bc5771de9c6c3c8e7fcfad72976
Diffstat (limited to 'gcc/go')
-rw-r--r-- | gcc/go/gofrontend/expressions.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index 47773304e73..72dcc2df218 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -8585,6 +8585,16 @@ Builtin_call_expression::do_export(Export* exp) const 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) |