aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/decl.c
diff options
context:
space:
mode:
authorDoug Rupp <rupp@adacore.com>2008-08-06 08:07:32 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2008-08-06 10:07:32 +0200
commitf0a631aae27cc03c1bc9b4a13c034df8c0fb10f9 (patch)
tree30bf49ccbbbb45b761fa755df0c66a9859ab5281 /gcc/ada/gcc-interface/decl.c
parent31fcb30fe6b1c157846247b2f6b809e8d9e50460 (diff)
downloadgcc-f0a631aae27cc03c1bc9b4a13c034df8c0fb10f9.zip
gcc-f0a631aae27cc03c1bc9b4a13c034df8c0fb10f9.tar.gz
gcc-f0a631aae27cc03c1bc9b4a13c034df8c0fb10f9.tar.bz2
decl.c (gnat_to_gnu_param): Force 32bit descriptor if TARGET_MALLOC64 clear.
2008-08-06 Doug Rupp <rupp@adacore.com> * gcc-interface/decl.c (gnat_to_gnu_param): Force 32bit descriptor if TARGET_MALLOC64 clear. * gcc-interface/utils2.c (build_call_alloc_dealloc): Force 32bit malloc if TARGET_MALLOC64 clear. * gcc-interface/gigi.h (TARGET_ABI_OPEN_VMS): Move here from utils2.c (TARGET_MALLC64): New macro. Default to clear. From-SVN: r138768
Diffstat (limited to 'gcc/ada/gcc-interface/decl.c')
-rw-r--r--gcc/ada/gcc-interface/decl.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index c9e9045..a136f96 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -4842,7 +4842,13 @@ gnat_to_gnu_param (Entity_Id gnat_param, Mechanism_Type mech,
= TREE_TYPE (TREE_TYPE (TYPE_FIELDS (TREE_TYPE (gnu_param_type))));
/* VMS descriptors are themselves passed by reference. */
- if (mech == By_Descriptor)
+ if (mech == By_Short_Descriptor ||
+ (mech == By_Descriptor && TARGET_ABI_OPEN_VMS && !TARGET_MALLOC64))
+ gnu_param_type
+ = build_pointer_type (build_vms_descriptor32 (gnu_param_type,
+ Mechanism (gnat_param),
+ gnat_subprog));
+ else if (mech == By_Descriptor)
{
/* Build both a 32-bit and 64-bit descriptor, one of which will be
chosen in fill_vms_descriptor. */
@@ -4855,11 +4861,6 @@ gnat_to_gnu_param (Entity_Id gnat_param, Mechanism_Type mech,
Mechanism (gnat_param),
gnat_subprog));
}
- else if (mech == By_Short_Descriptor)
- gnu_param_type
- = build_pointer_type (build_vms_descriptor32 (gnu_param_type,
- Mechanism (gnat_param),
- gnat_subprog));
/* Arrays are passed as pointers to element type for foreign conventions. */
else if (foreign