diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2016-06-29 13:03:22 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2016-06-29 13:03:22 +0000 |
commit | 9182f7184019a076898de5f2429ea5822e5ff324 (patch) | |
tree | 3e323522044ad364a4f5045ce965e3e6397562fb /gcc/ada/gcc-interface/gigi.h | |
parent | 1af21224e417d96b363e2b7dec0cbb0e3ed78f99 (diff) | |
download | gcc-9182f7184019a076898de5f2429ea5822e5ff324.zip gcc-9182f7184019a076898de5f2429ea5822e5ff324.tar.gz gcc-9182f7184019a076898de5f2429ea5822e5ff324.tar.bz2 |
re PR ada/48835 (porting GNAT to m68k-linux)
PR ada/48835
PR ada/61954
* gcc-interface/gigi.h (enum standard_datatypes): Add ADT_realloc_decl
(realloc_decl): New macro.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Use local
variable for the entity type and translate it as void pointer if the
entity has convention C.
(gnat_to_gnu_entity) <E_Function>: If this is not a definition and the
external name matches that of malloc_decl or realloc_decl, return the
correspoding node directly.
(gnat_to_gnu_subprog_type): Likewise for parameter and return types.
* gcc-interface/trans.c (gigi): Initialize void_list_node here, not...
Initialize realloc_decl.
* gcc-interface/utils.c (install_builtin_elementary_types): ...here.
(build_void_list_node): Delete.
* gcc-interface/utils2.c (known_alignment) <CALL_EXPR>: Return the
alignment of the system allocator for malloc_decl and realloc_decl.
Do not take alignment from void pointer types either.
From-SVN: r237850
Diffstat (limited to 'gcc/ada/gcc-interface/gigi.h')
-rw-r--r-- | gcc/ada/gcc-interface/gigi.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/ada/gcc-interface/gigi.h b/gcc/ada/gcc-interface/gigi.h index fcd866c..b4fa83f 100644 --- a/gcc/ada/gcc-interface/gigi.h +++ b/gcc/ada/gcc-interface/gigi.h @@ -394,13 +394,15 @@ enum standard_datatypes /* Value BITS_PER_UNIT in signed bitsizetype. */ ADT_sbitsize_unit_node, - /* Function declaration nodes for run-time functions for allocating memory. - Ada allocators cause calls to this function to be generated. */ + /* Function declaration node for run-time allocation function. */ ADT_malloc_decl, - /* Likewise for freeing memory. */ + /* Function declaration node for run-time freeing function. */ ADT_free_decl, + /* Function declaration node for run-time reallocation function. */ + ADT_realloc_decl, + /* Function decl node for 64-bit multiplication with overflow checking. */ ADT_mulv64_decl, @@ -471,6 +473,7 @@ extern GTY(()) tree gnat_raise_decls_ext[(int) LAST_REASON_CODE + 1]; #define sbitsize_unit_node gnat_std_decls[(int) ADT_sbitsize_unit_node] #define malloc_decl gnat_std_decls[(int) ADT_malloc_decl] #define free_decl gnat_std_decls[(int) ADT_free_decl] +#define realloc_decl gnat_std_decls[(int) ADT_realloc_decl] #define mulv64_decl gnat_std_decls[(int) ADT_mulv64_decl] #define parent_name_id gnat_std_decls[(int) ADT_parent_name_id] #define exception_data_name_id gnat_std_decls[(int) ADT_exception_data_name_id] |