mirror of git://gcc.gnu.org/git/gcc.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): Go back to build_distinct_type_copy, but copy the fields so that they have the right DECL_CONTEXT. From-SVN: r267789
This commit is contained in:
parent
9fa27ed088
commit
eea11d66bc
|
|
@ -1,3 +1,10 @@
|
|||
2019-01-09 Ian Lance Taylor <iant@golang.org>
|
||||
|
||||
PR go/86343
|
||||
* go-gcc.cc (Gcc_backend::set_placeholder_struct_type): Go back to
|
||||
build_distinct_type_copy, but copy the fields so that they have
|
||||
the right DECL_CONTEXT.
|
||||
|
||||
2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
|
||||
|
||||
PR other/16615
|
||||
|
|
|
|||
|
|
@ -1098,9 +1098,13 @@ 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_variant_type_copy(t);
|
||||
tree copy = build_distinct_type_copy(t);
|
||||
TYPE_NAME(copy) = NULL_TREE;
|
||||
DECL_ORIGINAL_TYPE(TYPE_NAME(t)) = copy;
|
||||
TYPE_SIZE(copy) = NULL_TREE;
|
||||
Btype* bc = this->make_type(copy);
|
||||
this->fill_in_struct(bc, fields);
|
||||
delete bc;
|
||||
}
|
||||
|
||||
return r->get_tree() != error_mark_node;
|
||||
|
|
|
|||
Loading…
Reference in New Issue