Commit 3df9a1fe by Ian Lance Taylor Committed by Ian Lance Taylor

go-gcc.cc (Gcc_backend::fill_in_struct): Mark struct types as using structural equality.

	* go-gcc.cc (Gcc_backend::fill_in_struct): Mark struct types as
	using structural equality.

From-SVN: r257357
parent 2c536ce7
2018-02-03 Ian Lance Taylor <iant@golang.org>
* go-gcc.cc (Gcc_backend::fill_in_struct): Mark struct types as
using structural equality.
2018-02-02 Ian Lance Taylor <iant@golang.org>
* go-gcc.cc (Gcc_backend::type_size): Return 0 for
......
......@@ -962,6 +962,13 @@ Gcc_backend::fill_in_struct(Btype* fill,
}
TYPE_FIELDS(fill_tree) = field_trees;
layout_type(fill_tree);
// Because Go permits converting between named struct types and
// equivalent struct types, for which we use VIEW_CONVERT_EXPR, and
// because we don't try to maintain TYPE_CANONICAL for struct types,
// we need to tell the middle-end to use structural equality.
SET_TYPE_STRUCTURAL_EQUALITY(fill_tree);
return fill;
}
......
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