Commit a0e8e630 by Ian Lance Taylor Committed by Ian Lance Taylor

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
parent 42c5d121
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> 2018-06-08 Cherry Zhang <cherryyz@google.com>
* go-gcc.cc (class Gcc_backend): Remove * go-gcc.cc (class Gcc_backend): Remove
......
...@@ -1100,7 +1100,7 @@ Gcc_backend::set_placeholder_struct_type( ...@@ -1100,7 +1100,7 @@ Gcc_backend::set_placeholder_struct_type(
if (TYPE_NAME(t) != NULL_TREE) if (TYPE_NAME(t) != NULL_TREE)
{ {
// Build the data structure gcc wants to see for a typedef. // 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; TYPE_NAME(copy) = NULL_TREE;
DECL_ORIGINAL_TYPE(TYPE_NAME(t)) = copy; DECL_ORIGINAL_TYPE(TYPE_NAME(t)) = copy;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment