compiler: ignore aliases in fieldtrack info
authorIan Lance Taylor <ian@gcc.gnu.org>
Fri, 23 Feb 2018 21:38:57 +0000 (21:38 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Fri, 23 Feb 2018 21:38:57 +0000 (21:38 +0000)
    We want to track references to fields in the real struct, not in
    aliases to the struct.

    Reviewed-on: https://go-review.googlesource.com/96816

From-SVN: r257954

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

index b708cb7c603dee203160a5654e04e20a5c3817a5..88291d585f9e165432f3a2cfbb3218239d98b0d2 100644 (file)
@@ -1,4 +1,4 @@
-ed8647cc99652db2d689215c05f31ad038438a7e
+8b3d6091801d485c74a9c92740c69673e39160b0
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
index 9792faaa0e4f91af0b87bc0085ca9553a32ad97a..10ab5b50db9275f7f298dd91aa7c93bebe577292 100644 (file)
@@ -11696,7 +11696,7 @@ Field_reference_expression::do_lower(Gogo* gogo, Named_object* function,
   Location loc = this->location();
 
   std::string s = "fieldtrack \"";
-  Named_type* nt = this->expr_->type()->named_type();
+  Named_type* nt = this->expr_->type()->unalias()->named_type();
   if (nt == NULL || nt->named_object()->package() == NULL)
     s.append(gogo->pkgpath());
   else