aboutsummaryrefslogtreecommitdiff
path: root/gcc/go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2022-03-08 13:30:02 -0800
committerIan Lance Taylor <iant@golang.org>2022-03-08 13:53:59 -0800
commit2858e2afcb0a6553a222e724d8426451364ee755 (patch)
tree1a2aec15b29142b96164fd030b0747bcb0396484 /gcc/go
parent6f748bc1e7fbae876ff47e3abe477253a0e70c09 (diff)
downloadgcc-2858e2afcb0a6553a222e724d8426451364ee755.zip
gcc-2858e2afcb0a6553a222e724d8426451364ee755.tar.gz
gcc-2858e2afcb0a6553a222e724d8426451364ee755.tar.bz2
compiler: ignore function type result name in export data
This change ensures that we never output a result name in the export data if there is only a single result. Previously we would output a ? if the single result had a name. That made the output unstable, because the hashing ignores the result name, so whether we output a ? or not depended on how equal hash elements were handled. For https://gcc.gnu.org/PR104832 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/390874
Diffstat (limited to 'gcc/go')
-rw-r--r--gcc/go/gofrontend/MERGE2
-rw-r--r--gcc/go/gofrontend/types.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index e68d2d9..d9b1269 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-787fd4475f9d9101bc138d0b9763b0f5ecca89a9
+5042f7efbdb2d64537dfef53a19e96ee5ec4db2d
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
diff --git a/gcc/go/gofrontend/types.cc b/gcc/go/gofrontend/types.cc
index 8267f15..3de0bd3 100644
--- a/gcc/go/gofrontend/types.cc
+++ b/gcc/go/gofrontend/types.cc
@@ -5303,7 +5303,7 @@ Function_type::do_export(Export* exp) const
if (results != NULL)
{
exp->write_c_string(" ");
- if (results->size() == 1 && results->begin()->name().empty())
+ if (results->size() == 1)
exp->write_type(results->begin()->type());
else
{