compiler: mark Call_expression multiple results as a result struct
authorIan Lance Taylor <iant@golang.org>
Tue, 28 Mar 2023 20:01:28 +0000 (13:01 -0700)
committerIan Lance Taylor <iant@golang.org>
Wed, 29 Mar 2023 00:31:19 +0000 (17:31 -0700)
In https://go.dev/cl/343873 we stopped padding zero-sized trailing
fields in functions that return multiple results where the last result
is zero-sized. This CL makes the corresponding change on the caller side.

The test case is https://go.dev/cl/479898.

Fixes golang/go#55242

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/479955

gcc/go/gofrontend/MERGE
gcc/go/gofrontend/expressions.cc

index 8c8025d..addef6f 100644 (file)
@@ -1,4 +1,4 @@
-9ffd6e679ff0e3a908d0ec2ed5c6efa1de827c3f
+63ba7dd52f2cc49dab4b70ac81309296a920d4dc
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
index 5390130..4ac55af 100644 (file)
@@ -11267,6 +11267,7 @@ Call_expression::do_lower(Gogo* gogo, Named_object* function,
 
       Struct_type* st = Type::make_struct_type(sfl, loc);
       st->set_is_struct_incomparable();
+      st->set_is_results_struct();
       this->call_temp_ = Statement::make_temporary(st, NULL, loc);
       inserter->insert(this->call_temp_);
     }