X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Fada%2Fgcc-interface%2Fdecl.c;h=a71c86ff970482dbb436a35d3a65275176a862a9;hb=bfa2a0bac16e46ccc52cc755c659416d026f89e6;hp=bc0804aa472a1e97f46a6a43e0577defaaff220a;hpb=0c1dfc4bd6804aeb6f6e0848fca81809ad858f25;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index bc0804aa472..a71c86ff970 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;