This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Ada] constrained discriminated records and SRA
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Martin Jambor <mjambor at suse dot cz>
- Date: Fri, 16 Oct 2009 08:58:13 +0200
- Subject: Re: [Ada] constrained discriminated records and SRA
- References: <200909291257.28654.ebotcazou@adacore.com>
> Martin, this should make it possible to get rid of
>
> /* Some ADA records are half-unions, treat all of them the same. */
> for (fld = TYPE_FIELDS (type); fld; fld = TREE_CHAIN (fld))
>
> and the associated special handling in the new SRA pass.
I've installed the attached patchlet.
2009-10-16 Eric Botcazou <ebotcazou@adacore.com>
* tree-sra.c (build_ref_for_offset_1): Update comment.
--
Eric Botcazou
Index: tree-sra.c
===================================================================
--- tree-sra.c (revision 152797)
+++ tree-sra.c (working copy)
@@ -1231,7 +1231,8 @@ build_ref_for_offset_1 (tree *res, tree
case UNION_TYPE:
case QUAL_UNION_TYPE:
case RECORD_TYPE:
- /* Some ADA records are half-unions, treat all of them the same. */
+ /* ??? Some records used to be half-unions in Ada so the code treats
+ the 3 container types the same. This has been fixed in Ada. */
for (fld = TYPE_FIELDS (type); fld; fld = TREE_CHAIN (fld))
{
HOST_WIDE_INT pos, size;