aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2023-03-19 00:24:54 +0100
committerMarc Poulhiès <poulhies@adacore.com>2023-05-26 09:29:16 +0200
commit1a9c7e9ca214d107b52d4ecd6cbb54b3bea62158 (patch)
tree3e11a7053ea49124e294fb4dedadca640a7db12b /gcc/ada/gcc-interface
parent0e1bba09231634176893908f4402d57ef21477f8 (diff)
downloadgcc-1a9c7e9ca214d107b52d4ecd6cbb54b3bea62158.zip
gcc-1a9c7e9ca214d107b52d4ecd6cbb54b3bea62158.tar.gz
gcc-1a9c7e9ca214d107b52d4ecd6cbb54b3bea62158.tar.bz2
ada: Remove Is_Descendant_Of_Address flag from Standard_Address
It breaks the Allow_Integer_Address special mode. Add new standard_address parameters to gigi and alphabetize others, this is necessary when addresses are not treated like integers. gcc/ada/ * back_end.adb (Call_Back_End): Add gigi_standard_address to the signature of the gigi procedure and alphabetize other parameters. Pass Standard_Address as actual parameter for it. * cstand.adb (Create_Standard): Do not set Is_Descendant_Of_Address on Standard_Address. * gcc-interface/gigi.h (gigi): Add a standard_address parameter and alphabetize others. * gcc-interface/trans.cc (gigi): Likewise. Record a builtin address type and save it as the type for Standard.Address.
Diffstat (limited to 'gcc/ada/gcc-interface')
-rw-r--r--gcc/ada/gcc-interface/gigi.h5
-rw-r--r--gcc/ada/gcc-interface/trans.cc16
2 files changed, 14 insertions, 7 deletions
diff --git a/gcc/ada/gcc-interface/gigi.h b/gcc/ada/gcc-interface/gigi.h
index fee0450..ec85ce4 100644
--- a/gcc/ada/gcc-interface/gigi.h
+++ b/gcc/ada/gcc-interface/gigi.h
@@ -245,11 +245,12 @@ extern void gigi (Node_Id gnat_root,
struct List_Header *list_headers_ptr,
Nat number_file,
struct File_Info_Type *file_info_ptr,
+ Entity_Id standard_address,
Entity_Id standard_boolean,
- Entity_Id standard_integer,
Entity_Id standard_character,
- Entity_Id standard_long_long_float,
Entity_Id standard_exception_type,
+ Entity_Id standard_integer,
+ Entity_Id standard_long_long_float,
Int gigi_operating_mode);
#ifdef __cplusplus
diff --git a/gcc/ada/gcc-interface/trans.cc b/gcc/ada/gcc-interface/trans.cc
index c26f1b6..13f438c 100644
--- a/gcc/ada/gcc-interface/trans.cc
+++ b/gcc/ada/gcc-interface/trans.cc
@@ -290,11 +290,12 @@ gigi (Node_Id gnat_root,
struct List_Header *list_headers_ptr,
Nat number_file,
struct File_Info_Type *file_info_ptr,
+ Entity_Id standard_address,
Entity_Id standard_boolean,
- Entity_Id standard_integer,
Entity_Id standard_character,
- Entity_Id standard_long_long_float,
Entity_Id standard_exception_type,
+ Entity_Id standard_integer,
+ Entity_Id standard_long_long_float,
Int gigi_operating_mode)
{
Node_Id gnat_iter;
@@ -375,14 +376,19 @@ gigi (Node_Id gnat_root,
double_float_alignment = get_target_double_float_alignment ();
double_scalar_alignment = get_target_double_scalar_alignment ();
- /* Record the builtin types. Define `integer' and `character' first so that
- dbx will output them first. */
+ /* Record the builtin types. */
+ record_builtin_type ("address", pointer_sized_int_node, false);
record_builtin_type ("integer", integer_type_node, false);
record_builtin_type ("character", char_type_node, false);
record_builtin_type ("boolean", boolean_type_node, false);
record_builtin_type ("void", void_type_node, false);
- /* Save the type we made for integer as the type for Standard.Integer. */
+ /* Save the type we made for address as the type for Standard.Address. */
+ save_gnu_tree (Base_Type (standard_address),
+ TYPE_NAME (pointer_sized_int_node),
+ false);
+
+ /* Likewise for integer as the type for Standard.Integer. */
save_gnu_tree (Base_Type (standard_integer),
TYPE_NAME (integer_type_node),
false);