This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Ada] constrained discriminated records and SRA


> 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;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]