re PR go/86343 (types built by GO share TYPE_FIELDS in unsupported way)
authorIan Lance Taylor <iant@golang.org>
Thu, 28 Jun 2018 17:46:36 +0000 (17:46 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Thu, 28 Jun 2018 17:46:36 +0000 (17:46 +0000)
PR go/86343
* go-gcc.cc (Gcc_backend::set_placeholder_struct_type): Call
build_variant_type_copy rather than build_distinct_type_copy.

From-SVN: r262225

gcc/go/ChangeLog
gcc/go/go-gcc.cc

index 4e473b60f52210cf4a839d63adad92e69e7a6378..0742fe09e1daf5acc1c2896a953366220b772138 100644 (file)
@@ -1,3 +1,9 @@
+2018-06-28  Ian Lance Taylor  <iant@golang.org>
+
+       PR go/86343
+       * go-gcc.cc (Gcc_backend::set_placeholder_struct_type): Call
+       build_variant_type_copy rather than build_distinct_type_copy.
+
 2018-06-08  Cherry Zhang  <cherryyz@google.com>
 
        * go-gcc.cc (class Gcc_backend): Remove
index 870e865fe8fbaf08caae1e845b7d0f4301200053..76a2026f1e09c83a7c3907f0ef0e5ee5227c9e1f 100644 (file)
@@ -1100,7 +1100,7 @@ Gcc_backend::set_placeholder_struct_type(
   if (TYPE_NAME(t) != NULL_TREE)
     {
       // Build the data structure gcc wants to see for a typedef.
-      tree copy = build_distinct_type_copy(t);
+      tree copy = build_variant_type_copy(t);
       TYPE_NAME(copy) = NULL_TREE;
       DECL_ORIGINAL_TYPE(TYPE_NAME(t)) = copy;
     }