Commit 63787194 by Eric Botcazou Committed by Eric Botcazou

utils.c (finish_record_type): Force structural equality checks if the record type is discriminated.

	* gcc-interface/utils.c (finish_record_type): Force structural equality
	checks if the record type is discriminated.

From-SVN: r145549
parent 5eeeac64
2009-04-04 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.c (finish_record_type): Force structural equality
checks if the record type is discriminated.
2009-03-31 Eric Botcazou <ebotcazou@adacore.com> 2009-03-31 Eric Botcazou <ebotcazou@adacore.com>
* system-linux-alpha.ads (Functions_Return_By_DSP): Remove. * system-linux-alpha.ads (Functions_Return_By_DSP): Remove.
...@@ -977,6 +977,11 @@ finish_record_type (tree record_type, tree fieldlist, int rep_level, ...@@ -977,6 +977,11 @@ finish_record_type (tree record_type, tree fieldlist, int rep_level,
if (code == QUAL_UNION_TYPE) if (code == QUAL_UNION_TYPE)
nreverse (fieldlist); nreverse (fieldlist);
/* If the type is discriminated, it can be used to access all its
constrained subtypes, so force structural equality checks. */
if (CONTAINS_PLACEHOLDER_P (size))
SET_TYPE_STRUCTURAL_EQUALITY (record_type);
if (rep_level < 2) if (rep_level < 2)
{ {
/* If this is a padding record, we never want to make the size smaller /* If this is a padding record, we never want to make the size smaller
......
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