Commit 29b1c5a4 by Eric Botcazou Committed by Eric Botcazou

decl.c (gnat_to_gnu_entity): Set minimum alignment on fields of the RETURN type…

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
parent 88872b00
2011-04-08 Eric Botcazou <ebotcazou@adacore.com> 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 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
of aggregate types that contain a placeholder. of aggregate types that contain a placeholder.
......
...@@ -4226,6 +4226,9 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) ...@@ -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, = create_field_decl (gnu_param_name, gnu_param_type,
gnu_return_type, NULL_TREE, NULL_TREE, gnu_return_type, NULL_TREE, NULL_TREE,
0, 0); 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), Sloc_to_locus (Sloc (gnat_param),
&DECL_SOURCE_LOCATION (gnu_field)); &DECL_SOURCE_LOCATION (gnu_field));
DECL_CHAIN (gnu_field) = gnu_field_list; DECL_CHAIN (gnu_field) = gnu_field_list;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment