diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2012-01-27 09:50:17 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2012-01-27 09:50:17 +0000 |
commit | 46c91e45189f62bc959245d9ca5d40f44a65ac82 (patch) | |
tree | fbd9bc256af582f14dab21ee821d68f28b3bca76 /gcc | |
parent | 16934bbf731f4cd735b9d93d6695f181c7ec59ef (diff) | |
download | gcc-46c91e45189f62bc959245d9ca5d40f44a65ac82.zip gcc-46c91e45189f62bc959245d9ca5d40f44a65ac82.tar.gz gcc-46c91e45189f62bc959245d9ca5d40f44a65ac82.tar.bz2 |
decl.c (gnat_to_gnu_entity): Do not set an alignment on fields of the RETURN type built for the CICO mechanism.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Do not set
an alignment on fields of the RETURN type built for the CICO mechanism.
From-SVN: r183611
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/decl.c | 7 |
2 files changed, 9 insertions, 5 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 2b9db09..bfc7f2e 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,8 +1,13 @@ 2012-01-27 Eric Botcazou <ebotcazou@adacore.com> + * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Do not set + an alignment on fields of the RETURN type built for the CICO mechanism. + +2012-01-27 Eric Botcazou <ebotcazou@adacore.com> + * gcc-interface/trans.c (gnat_to_gnu): Avoid making a SAVE_EXPR for a call to a function that returns an unconstrained type with default - discriminant. Similarly, avoid doing the conversion to the nominal + discriminant. Similarly, avoid doing the conversion to the nominal result type in this case. 2012-01-27 Eric Botcazou <ebotcazou@adacore.com> diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index bc0804a..a71c86f 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -4305,7 +4305,9 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) gnu_return_type = gnu_new_ret_type; TYPE_NAME (gnu_return_type) = get_identifier ("RETURN"); - /* Set a default alignment to speed up accesses. */ + /* Set a default alignment to speed up accesses. But we + shouldn't increase the size of the structure too much, + lest it doesn't fit in return registers anymore. */ TYPE_ALIGN (gnu_return_type) = get_mode_alignment (ptr_mode); } @@ -4314,9 +4316,6 @@ 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; |