diff options
author | Doug Rupp <rupp@adacore.com> | 2008-08-06 08:07:32 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2008-08-06 10:07:32 +0200 |
commit | f0a631aae27cc03c1bc9b4a13c034df8c0fb10f9 (patch) | |
tree | 30bf49ccbbbb45b761fa755df0c66a9859ab5281 /gcc/ada/gcc-interface/utils2.c | |
parent | 31fcb30fe6b1c157846247b2f6b809e8d9e50460 (diff) | |
download | gcc-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/utils2.c')
-rw-r--r-- | gcc/ada/gcc-interface/utils2.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/gcc/ada/gcc-interface/utils2.c b/gcc/ada/gcc-interface/utils2.c index 84d5a58..0462426 100644 --- a/gcc/ada/gcc-interface/utils2.c +++ b/gcc/ada/gcc-interface/utils2.c @@ -47,12 +47,6 @@ #include "gigi.h" #include "snames.h" -/* Let code below know whether we are targetting VMS without need of - intrusive preprocessor directives. */ -#ifndef TARGET_ABI_OPEN_VMS -#define TARGET_ABI_OPEN_VMS 0 -#endif - static tree find_common_type (tree, tree); static bool contains_save_expr_p (tree); static tree contains_null_expr (tree); @@ -1957,9 +1951,11 @@ build_call_alloc_dealloc (tree gnu_obj, tree gnu_size, unsigned align, /* If the allocator size is 32bits but the pointer size is 64bits then allocate 32bit memory (sometimes necessary on 64bit VMS). Otherwise default to standard malloc. */ - if (TARGET_ABI_OPEN_VMS && POINTER_SIZE == 64 - && (UI_To_Int (Esize (Etype (gnat_node))) == 32 - || Convention (Etype (gnat_node)) == Convention_C)) + if (TARGET_ABI_OPEN_VMS && + (!TARGET_MALLOC64 || + (POINTER_SIZE == 64 + && (UI_To_Int (Esize (Etype (gnat_node))) == 32 + || Convention (Etype (gnat_node)) == Convention_C)))) return build_call_1_expr (malloc32_decl, gnu_size); else return build_call_1_expr (malloc_decl, gnu_size); |