diff options
author | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2017-10-14 16:47:32 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2017-10-14 16:47:32 +0000 |
commit | 2e60feb59198791c0a3b58838af26e6e5cd32677 (patch) | |
tree | a2803d3e114202f43f862c4e7de524581b8f381c /gcc/ada/cstand.adb | |
parent | a0b0d710266ee06d1cd17fd16452aff9b614d62a (diff) | |
download | gcc-2e60feb59198791c0a3b58838af26e6e5cd32677.zip gcc-2e60feb59198791c0a3b58838af26e6e5cd32677.tar.gz gcc-2e60feb59198791c0a3b58838af26e6e5cd32677.tar.bz2 |
[multiple changes]
2017-10-14 Ed Schonberg <schonberg@adacore.com>
* doc/gnat_rm/implementation_defined_aspects.rst: Add documentation
for reverse iteration over formal containers.
* gnat_rm.texi: Regenerate.
2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
* sem_elab.adb (Ensure_Dynamic_Prior_Elaboration): Renamed to
Ensure_Prior_Elaboration_Dynamic for consistency reasons.
(Ensure_Static_Prior_Elaboration): Renamed to
Ensure_Prior_Elaboration_Static for consistency reasons.
(Info_Variable_Reference): Renamed to Info_Variable_Read in order to
reflect its new purpose.
(Is_Initialized): New routine.
(Is_Suitable_Variable_Reference): Renamed to Is_Suitable_Variable_Read
in order to reflect its new purpose.
(Is_Variable_Read): New routine.
(Output_Variable_Reference): Renamed to Output_Variable_Read in order
to reflect its new purpose.
(Process_Variable_Assignment): This routine now acts as a top level
dispatcher for variable assignments.
(Process_Variable_Assignment_Ada): New routine.
(Process_Variable_Assignment_SPARK): New routine.
(Process_Variable_Reference): Renamed to Process_Variable_Read in order
to reflects its new purpose. A reference to a variable is now suitable
for ABE processing only when it is a read. The logic in the routine now
reflects the latest SPARK elaboration rules.
2017-10-14 Justin Squirek <squirek@adacore.com>
* sem_ch8.adb (Analyze_Subprogram_Renaming): Modify condition that
triggers marking on formal subprograms.
2017-10-14 Javier Miranda <miranda@adacore.com>
* checks.adb (Ensure_Valid): Do not skip adding the validity check on
renamings of objects that come from the sources.
2017-10-14 Eric Botcazou <ebotcazou@adacore.com>
* cstand.adb (Build_Float_Type): Move down Siz parameter, add Align
parameter and set the alignment of the type to Align.
(Copy_Float_Type): Adjust call to Build_Float_Type.
(Register_Float_Type): Add pragma Unreferenced for Precision. Adjust
call to Build_Float_Type and do not set RM_Size and Alignment.
From-SVN: r253756
Diffstat (limited to 'gcc/ada/cstand.adb')
-rw-r--r-- | gcc/ada/cstand.adb | 49 |
1 files changed, 30 insertions, 19 deletions
diff --git a/gcc/ada/cstand.adb b/gcc/ada/cstand.adb index fe480be..34617bb 100644 --- a/gcc/ada/cstand.adb +++ b/gcc/ada/cstand.adb @@ -62,15 +62,22 @@ package body CStand is ----------------------- procedure Build_Float_Type - (E : Entity_Id; - Siz : Int; - Rep : Float_Rep_Kind; - Digs : Int); + (E : Entity_Id; + Digs : Int; + Rep : Float_Rep_Kind; + Siz : Int; + Align : Int); -- Procedure to build standard predefined float base type. The first - -- parameter is the entity for the type, and the second parameter is the - -- size in bits. The third parameter indicates the kind of representation - -- to be used. The fourth parameter is the digits value. Each type + -- parameter is the entity for the type. The second parameter is the + -- digits value. The third parameter indicates the representation to + -- be used for the type. The fourth parameter is the size in bits. + -- The fifth parameter is the alignment in storage units. Each type -- is added to the list of predefined floating point types. + -- + -- Note that both RM_Size and Esize are set to the specified size, i.e. + -- we do not set the RM_Size to the precision passed by the back end. + -- This is consistent with the semantics of 'Size specified in the RM + -- because we cannot pack components of the type tighter than this size. procedure Build_Signed_Integer_Type (E : Entity_Id; Siz : Nat); -- Procedure to build standard predefined signed integer subtype. The @@ -189,10 +196,11 @@ package body CStand is ---------------------- procedure Build_Float_Type - (E : Entity_Id; - Siz : Int; - Rep : Float_Rep_Kind; - Digs : Int) + (E : Entity_Id; + Digs : Int; + Rep : Float_Rep_Kind; + Siz : Int; + Align : Int) is begin Set_Type_Definition (Parent (E), @@ -201,10 +209,10 @@ package body CStand is Set_Ekind (E, E_Floating_Point_Type); Set_Etype (E, E); - Set_Float_Rep (E, Rep); - Init_Size (E, Siz); - Set_Elem_Alignment (E); Init_Digits_Value (E, Digs); + Set_Float_Rep (E, Rep); + Init_Size (E, Siz); + Set_Alignment (E, UI_From_Int (Align)); Set_Float_Bounds (E); Set_Is_Frozen (E); Set_Is_Public (E); @@ -295,8 +303,9 @@ package body CStand is procedure Copy_Float_Type (To : Entity_Id; From : Entity_Id) is begin - Build_Float_Type (To, UI_To_Int (Esize (From)), Float_Rep (From), - UI_To_Int (Digits_Value (From))); + Build_Float_Type + (To, UI_To_Int (Digits_Value (From)), Float_Rep (From), + UI_To_Int (Esize (From)), UI_To_Int (Alignment (From))); end Copy_Float_Type; ---------------------- @@ -2065,15 +2074,17 @@ package body CStand is Size : Positive; Alignment : Natural) is + pragma Unreferenced (Precision); + -- See Build_Float_Type for the rationale + Ent : constant Entity_Id := New_Standard_Entity; begin Set_Defining_Identifier (New_Node (N_Full_Type_Declaration, Stloc), Ent); Make_Name (Ent, Name); Set_Scope (Ent, Standard_Standard); - Build_Float_Type (Ent, Int (Size), Float_Rep, Pos (Digs)); - Set_RM_Size (Ent, UI_From_Int (Int (Precision))); - Set_Alignment (Ent, UI_From_Int (Int (Alignment / 8))); + Build_Float_Type + (Ent, Pos (Digs), Float_Rep, Int (Size), Int (Alignment / 8)); if No (Back_End_Float_Types) then Back_End_Float_Types := New_Elmt_List; |