OSDN Git Service

* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set default
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 Apr 2010 10:51:30 +0000 (10:51 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 Apr 2010 10:51:30 +0000 (10:51 +0000)
alignment on the RETURN type built for the Copy-In Copy-Out mechanism.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158054 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/gcc-interface/decl.c

index 89f5cad..09469ac 100644 (file)
@@ -1,5 +1,10 @@
 2010-04-07  Eric Botcazou  <ebotcazou@adacore.com>
 
+       * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set default
+       alignment on the RETURN type built for the Copy-In Copy-Out mechanism.
+
+2010-04-07  Eric Botcazou  <ebotcazou@adacore.com>
+
        * gcc-interface/trans.c (call_to_gnu): In the return-by-target-ptr case
        do not set the result type if there is a specified target and do not
        convert the result in any cases.
index 0effe88..0b620a0 100644 (file)
@@ -4062,6 +4062,9 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
                    gcc_assert (TREE_CODE (gnu_return_type) == VOID_TYPE);
                    gnu_return_type = make_node (RECORD_TYPE);
                    TYPE_NAME (gnu_return_type) = get_identifier ("RETURN");
+                   /* Set a default alignment to speed up accesses.  */
+                   TYPE_ALIGN (gnu_return_type)
+                     = get_mode_alignment (ptr_mode);
                    has_copy_in_out = true;
                  }