aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/decl.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2011-04-08 20:30:14 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2011-04-08 20:30:14 +0000
commit29b1c5a4fdb32f122c7d6d8f0c5e77118b4c4a24 (patch)
tree0b75108593fa1c6fe89fd8a7bf1647551deae10d /gcc/ada/gcc-interface/decl.c
parent88872b00daeaf461796962afeb8901c172aacc50 (diff)
downloadgcc-29b1c5a4fdb32f122c7d6d8f0c5e77118b4c4a24.zip
gcc-29b1c5a4fdb32f122c7d6d8f0c5e77118b4c4a24.tar.gz
gcc-29b1c5a4fdb32f122c7d6d8f0c5e77118b4c4a24.tar.bz2
decl.c (gnat_to_gnu_entity): Set minimum alignment on fields of the RETURN type built for the Copy-In...
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum alignment on fields of the RETURN type built for the Copy-In Copy-Out mechanism. From-SVN: r172210
Diffstat (limited to 'gcc/ada/gcc-interface/decl.c')
-rw-r--r--gcc/ada/gcc-interface/decl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index 2902396..bc6b9cc 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -4226,6 +4226,9 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
= create_field_decl (gnu_param_name, gnu_param_type,
gnu_return_type, NULL_TREE, NULL_TREE,
0, 0);
+ /* Set a minimum alignment to speed up accesses. */
+ if (DECL_ALIGN (gnu_field) < TYPE_ALIGN (gnu_return_type))
+ DECL_ALIGN (gnu_field) = TYPE_ALIGN (gnu_return_type);
Sloc_to_locus (Sloc (gnat_param),
&DECL_SOURCE_LOCATION (gnu_field));
DECL_CHAIN (gnu_field) = gnu_field_list;