aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2017-09-14 03:51:21 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2017-09-14 03:51:21 +0000
commit03ff36aa01bd359f74cbd1f2afec569ce0b77a15 (patch)
tree370f8d0a41e4dd4390ca82e1e1c209f21c2f9f41 /gcc
parentce64a8b4a2334fd6982a21d1ab020a1108562f6b (diff)
downloadgcc-03ff36aa01bd359f74cbd1f2afec569ce0b77a15.zip
gcc-03ff36aa01bd359f74cbd1f2afec569ce0b77a15.tar.gz
gcc-03ff36aa01bd359f74cbd1f2afec569ce0b77a15.tar.bz2
compiler: emit type specific functions for aliases
If we have an alias for a struct or array that requires a type-specific function, don't emit the function with the alias name. Emit it with the struct/array as usual. Test case is https://golang.org/cl/62531. Reviewed-on: https://go-review.googlesource.com/62412 From-SVN: r252747
Diffstat (limited to 'gcc')
-rw-r--r--gcc/go/gofrontend/MERGE2
-rw-r--r--gcc/go/gofrontend/gogo.cc2
2 files changed, 3 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index a905f58..74a0dba 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-b0a46c2cdb915ddc4a4e401af9ef6eb2bcd4d4ea
+89e46ae0cde7bebd8e97434355c5b7e57d902613
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/gogo.cc b/gcc/go/gofrontend/gogo.cc
index 5dbe29d..adc8e8a 100644
--- a/gcc/go/gofrontend/gogo.cc
+++ b/gcc/go/gofrontend/gogo.cc
@@ -2498,6 +2498,8 @@ Specific_type_functions::type(Type* t)
case Type::TYPE_NAMED:
{
Named_type* nt = t->named_type();
+ if (nt->is_alias())
+ return TRAVERSE_CONTINUE;
if (t->needs_specific_type_functions(this->gogo_))
t->type_functions(this->gogo_, nt, NULL, NULL, &hash_fn, &equal_fn);