diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-04-08 20:30:14 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-04-08 20:30:14 +0000 |
commit | 6089eb2d19e41b6be99043acbcbdf5add19a7d0b (patch) | |
tree | 0b75108593fa1c6fe89fd8a7bf1647551deae10d /gcc/ada | |
parent | 9fcbd72c440f25fed0302a49e6da736454fb4f66 (diff) | |
download | gcc-6089eb2d19e41b6be99043acbcbdf5add19a7d0b.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172210 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/decl.c | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 2046aa715d9..e16092ff33e 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,11 @@ 2011-04-08 Eric Botcazou <ebotcazou@adacore.com> + * 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. + +2011-04-08 Eric Botcazou <ebotcazou@adacore.com> + * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers of aggregate types that contain a placeholder. diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index 29023965fc5..bc6b9cc7bf3 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; |