From: Ian Lance Taylor Date: Thu, 28 Jun 2018 17:46:36 +0000 (+0000) Subject: re PR go/86343 (types built by GO share TYPE_FIELDS in unsupported way) X-Git-Tag: basepoints/gcc-10~5640 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a0e8e6308fa856a7783f4c60938f0c57521cb473;p=thirdparty%2Fgcc.git re PR go/86343 (types built by GO share TYPE_FIELDS in unsupported way) 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 --- diff --git a/gcc/go/ChangeLog b/gcc/go/ChangeLog index 4e473b60f522..0742fe09e1da 100644 --- a/gcc/go/ChangeLog +++ b/gcc/go/ChangeLog @@ -1,3 +1,9 @@ +2018-06-28 Ian Lance Taylor + + 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 * go-gcc.cc (class Gcc_backend): Remove diff --git a/gcc/go/go-gcc.cc b/gcc/go/go-gcc.cc index 870e865fe8fb..76a2026f1e09 100644 --- a/gcc/go/go-gcc.cc +++ b/gcc/go/go-gcc.cc @@ -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; }