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] Add support for scalar types with small alignment


> 2008-03-08  Eric Botcazou  <ebotcazou@adacore.com>
>
> 	* decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>: Add suppor
> 	for scalar types with small alignment.

A bit of related housekeeping.

Tested on i586-suse-linux, applied on the mainline.


2008-03-08  Eric Botcazou  <ebotcazou@adacore.com>

	* decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>: Do not
	bother propagating the TYPE_USER_ALIGN flag when creating a JM type.


-- 
Eric Botcazou
Index: decl.c
===================================================================
--- decl.c	(revision 133031)
+++ decl.c	(working copy)
@@ -1484,7 +1484,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entit
 	 such values), we only get the good bits, since the unused bits
 	 are uninitialized.  Both goals are accomplished by wrapping the
 	 modular value in an enclosing struct.  */
-	if (Is_Packed_Array_Type (gnat_entity))
+      if (Is_Packed_Array_Type (gnat_entity))
 	{
 	  tree gnu_field_type = gnu_type;
 	  tree gnu_field;
@@ -1499,7 +1499,6 @@ gnat_to_gnu_entity (Entity_Id gnat_entit
 	     their size, which may seem counter-intuitive but makes it
 	     possible to easily overlay them on modular types.  */
 	  TYPE_ALIGN (gnu_type) = TYPE_ALIGN (gnu_field_type);
-	  TYPE_USER_ALIGN (gnu_type) = TYPE_USER_ALIGN (gnu_field_type);
 	  TYPE_PACKED (gnu_type) = 1;
 
 	  /* Create a stripped-down declaration of the original type, mainly

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