summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-07-07 09:41:56 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-07-07 09:41:56 +0000
commit0ac6f3b3f98435ab28c9cdc020c75d7134ea8ca7 (patch)
treefd1f814171f120aad67442bac387846d899371e1
parentb6cae871b56d3701ad7db1e63ee39945560c086e (diff)
downloadgcc-0ac6f3b3f98435ab28c9cdc020c75d7134ea8ca7.tar.gz
2005-07-07 Eric Botcazou <ebotcazou@adacore.com>
* decl.c (gnat_to_gnu_entity) <E_Procedure>: Do not strip the padding type if the parameter is not passed by copy but reference by default. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101693 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ada/decl.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c
index fb6d002da07..88fef2157d3 100644
--- a/gcc/ada/decl.c
+++ b/gcc/ada/decl.c
@@ -3426,8 +3426,12 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
if (TREE_CODE (gnu_param_type) == RECORD_TYPE
&& TYPE_IS_PADDING_P (gnu_param_type)
&& (req_by_ref || Has_Foreign_Convention (gnat_entity)
- || !must_pass_by_ref (TREE_TYPE (TYPE_FIELDS
- (gnu_param_type)))))
+ || (!must_pass_by_ref (TREE_TYPE (TYPE_FIELDS
+ (gnu_param_type)))
+ && (req_by_copy
+ || !default_pass_by_ref (TREE_TYPE
+ (TYPE_FIELDS
+ (gnu_param_type)))))))
gnu_param_type = TREE_TYPE (TYPE_FIELDS (gnu_param_type));
/* If this is an IN parameter it is read-only, so make a variant