diff options
author | Ian Lance Taylor <iant@golang.org> | 2018-06-28 17:46:36 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-06-28 17:46:36 +0000 |
commit | a0e8e6308fa856a7783f4c60938f0c57521cb473 (patch) | |
tree | 3630f8ff7b67ea7345ee488c2672d733ba4a7923 | |
parent | 42c5d1212ff6544be1061d488aa7ebee9463c375 (diff) | |
download | gcc-a0e8e6308fa856a7783f4c60938f0c57521cb473.zip gcc-a0e8e6308fa856a7783f4c60938f0c57521cb473.tar.gz gcc-a0e8e6308fa856a7783f4c60938f0c57521cb473.tar.bz2 |
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
-rw-r--r-- | gcc/go/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/go/go-gcc.cc | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/go/ChangeLog b/gcc/go/ChangeLog index 4e473b6..0742fe0 100644 --- a/gcc/go/ChangeLog +++ b/gcc/go/ChangeLog @@ -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 diff --git a/gcc/go/go-gcc.cc b/gcc/go/go-gcc.cc index 870e865..76a2026 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; } |