diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2009-04-04 19:11:05 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2009-04-04 19:11:05 +0000 |
commit | 63787194e1a9a90650caf40922dc09b31a0501bd (patch) | |
tree | 598fac2051dbb237479e17097b44b966cdc5a380 | |
parent | 5eeeac64dc4204103a5e394ab522c2780b2410f7 (diff) | |
download | gcc-63787194e1a9a90650caf40922dc09b31a0501bd.zip gcc-63787194e1a9a90650caf40922dc09b31a0501bd.tar.gz gcc-63787194e1a9a90650caf40922dc09b31a0501bd.tar.bz2 |
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
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/utils.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index cb281b4..992b1e0 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +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> * system-linux-alpha.ads (Functions_Return_By_DSP): Remove. diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c index 8c5dc58..51bce2f 100644 --- a/gcc/ada/gcc-interface/utils.c +++ b/gcc/ada/gcc-interface/utils.c @@ -977,6 +977,11 @@ finish_record_type (tree record_type, tree fieldlist, int rep_level, if (code == QUAL_UNION_TYPE) 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 this is a padding record, we never want to make the size smaller |