aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/einfo.ads
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/einfo.ads')
-rw-r--r--gcc/ada/einfo.ads104
1 files changed, 72 insertions, 32 deletions
diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads
index b9548a7..398424c 100644
--- a/gcc/ada/einfo.ads
+++ b/gcc/ada/einfo.ads
@@ -405,12 +405,27 @@ package Einfo is
-- (including exceptions where it refers to the static data allocated for
-- an exception), loop parameters, and formal parameters. This indicates
-- the desired alignment for a type, or the actual alignment for an
--- object. A value of zero (Uint_0) indicates that the alignment has not
--- been set yet. The alignment can be set by an explicit alignment
--- clause, or set by the front-end in package Layout, or set by the
--- back-end as part of the back-end back-annotation process. The
--- alignment field is also defined in E_Exception entities, but there it
--- is used only by the back-end for back annotation.
+-- object. The alignment can be set by an explicit alignment aspect or
+-- clause, or set by the front end in the package Layout, or set by the
+-- back end as part of the back-end back-annotation process. The field
+-- is also defined in E_Exception entities, but there it is used only by
+-- the back end for back annotation.
+
+-- The implementation guarantees that the run-time address of an object
+-- is a multiple of the value of its Alignment field in storage units,
+-- up to some maximum value dependent on the target that is under the
+-- sole control of the back end (not equal to Ttypes.Maximum_Alignment
+-- in the general case), provided that the object is not subject to an
+-- address aspect/clause.
+
+-- When the object is subject to an address aspect/clause, this guarantee
+-- is voided and the object may be misaligned at run time. On the targets
+-- that require strict alignment of memory accesses, a run-time alignment
+-- check is generated unconditionally and Program_Error is raised if the
+-- object is misaligned. On the other targets, this run-time alignment
+-- check is generated only if the object is also subject to an alignment
+-- aspect/clause; if it is not, the program may run with the misaligned
+-- object (its execution is erroneous as per the RM 13.3(27) subclause).
-- Alignment_Clause (synthesized)
-- Applies to all entities for types and objects. If an alignment
@@ -1585,11 +1600,11 @@ package Einfo is
-- type derivation.
-- Has_Delayed_Aspects
--- Defined in all entities. Set if the Rep_Item chain for the entity has
--- one or more N_Aspect_Definition nodes chained which are not to be
--- evaluated till the freeze point. The aspect definition expression
--- clause has been preanalyzed to get visibility at the point of use,
--- but no other action has been taken.
+-- Defined in all entities. Set if the Rep_Item chain for the entity has
+-- one or more N_Aspect_Definition nodes chained which are not to be
+-- evaluated till the freeze point. The aspect definition expression
+-- clause has been preanalyzed to get visibility at the point of use,
+-- but no other action has been taken.
-- Has_Delayed_Freeze
-- Defined in all entities. Set to indicate that an explicit freeze
@@ -1889,10 +1904,6 @@ package Einfo is
-- 5. N_Range_Constraint - when the range expression uses the
-- discriminant of the enclosing type.
--- Has_Pragma_Controlled [implementation base type only]
--- Defined in access type entities. It is set if a pragma Controlled
--- applies to the access type.
-
-- Has_Pragma_Elaborate_Body
-- Defined in all entities. Set in compilation unit entities if a
-- pragma Elaborate_Body applies to the compilation unit.
@@ -2175,9 +2186,21 @@ package Einfo is
-- inherited in certain contexts.
-- Has_Unsigned_Base_Range_Aspect [base type only]
--- Defined in integer types. Set in the base type of an integer type for
--- which the type has an Unsigned_Base_Range of True (whether by an
--- aspect_specification, a pragma, or inheritance).
+-- Defined in modular integer types. This flag is set in the base type
+-- generated by the frontend for a signed integer type that has an
+-- Unsigned_Base_Range of True (whether by an aspect_specification, a
+-- pragma, or inheritance).
+
+-- Has_Modular_Operations (synthesized)
+-- Defined in modular integer types. True when the type has modular
+-- operations; that is, when its base type does NOT have the attribute
+-- Unsigned_Base_Range_Aspect set to True.
+
+-- Has_Overflow_Operations (synthesized)
+-- Defined in signed integer types and modular integer types. True when
+-- the type has overflow operations; that is, when the type is either
+-- (1) a signed integer type, or (2) a modular integer type and its
+-- base type has the attribute Unsigned_Base_Range_Aspect.
-- Has_Visible_Refinement
-- Defined in E_Abstract_State entities. Set when a state has at least
@@ -2383,7 +2406,7 @@ package Einfo is
-- Is_Activation_Record
-- Applies to E_In_Parameters generated in Exp_Unst for nested
-- subprograms, to mark the added formal that carries the activation
--- record created in the enclosing subprogram.
+-- record created in the enclosing subprogram. Used by the llvm back end.
-- Is_Actual_Subtype
-- Defined on all types, true for the generated constrained subtypes
@@ -2526,6 +2549,10 @@ package Einfo is
-- and subtypes, string types and subtypes, and all numeric types).
-- Set if the type or subtype is constrained.
+-- Is_Constructor
+-- Defined in procedure entities. Set if a procedure denotes a
+-- constructor that allows object initialization via the 'Make attribute.
+
-- Is_Constr_Array_Subt_With_Bounds
-- Defined in all types and subtypes. Set only for an array subtype
-- which is constrained but nevertheless requires objects of this
@@ -2537,10 +2564,6 @@ package Einfo is
-- subtype of an object whose nominal subtype is unconstrained. Note
-- that the constructed subtype itself will be constrained.
--- Is_Constructor
--- Defined in function and procedure entities. Set if a pragma
--- CPP_Constructor applies to the subprogram.
-
-- Is_Controlled_Active [base type only]
-- Defined in all type entities. Indicates that the type is controlled,
-- i.e. has been declared with the Finalizable or the Destructor aspect
@@ -2562,6 +2585,10 @@ package Einfo is
-- Defined in all type entities, set only for tagged types to which a
-- valid pragma Import (CPP, ...) or pragma CPP_Class has been applied.
+-- Is_CPP_Constructor
+-- Defined in function and procedure entities. Set if a pragma
+-- CPP_Constructor applies to the subprogram.
+
-- Is_CUDA_Kernel
-- Defined in function and procedure entities. Set if the subprogram is a
-- CUDA kernel.
@@ -2596,7 +2623,7 @@ package Einfo is
-- Is_Discriminant_Check_Function
-- Defined in all entities. Set only in E_Function entities for functions
--- created to do discriminant checks.
+-- created to do discriminant checks. Used by CodePeer.
-- Is_Discriminal (synthesized)
-- Applies to all entities, true for renamings of discriminants. Such
@@ -3471,10 +3498,6 @@ package Einfo is
-- as its corresponding record type, but whose parent is the full view
-- of the parent in the original type extension.
--- Is_Unimplemented
--- Defined in all entities. Set for any entity to which a valid pragma
--- or aspect Unimplemented applies.
-
-- Is_Unsigned_Type
-- Defined in all types, but can be set only for discrete and fixed-point
-- type and subtype entities. This flag is only valid if the entity is
@@ -3552,6 +3575,15 @@ package Einfo is
-- a wrapper to handle inherited class-wide pre/post conditions that call
-- overridden primitives or as a wrapper of a controlling function.
+-- Is_IEEE_Extended_Precision
+-- Defined in floating point types and subtypes. Indicates that the type
+-- corresponds to the 80-bit IEEE extended precision format. That format
+-- effectively uses 80 bits per value, but we set its Size to a larger
+-- value for the reasons explained in the documentation comment of
+-- Build_Float_Type. We also perform some extra work to consistently set
+-- the extra bits to zero in the 'Write implementation, which is why we
+-- need this flag.
+
-- Itype_Printed
-- Defined in all type and subtype entities. Set in Itypes if the Itype
-- has been printed by Sprint. This is used to avoid printing an Itype
@@ -3705,6 +3737,11 @@ package Einfo is
-- preelaborable initialization at freeze time (this has to be deferred
-- to the freeze point because of the rule about overriding Initialize).
+-- Needs_Construction
+-- Defined in all type and subtype entities. Set only for record type
+-- entities for which at least one ancestor has specified a constructor
+-- through the 'Constructor direct attribute definition.
+
-- Needs_Debug_Info
-- Defined in all entities. Set if the entity requires normal debugging
-- information to be generated. This is true of all entities that have
@@ -5018,7 +5055,6 @@ package Einfo is
-- Is_Thunk
-- Is_Trivial_Subprogram
-- Is_Unchecked_Union
- -- Is_Unimplemented
-- Is_Visible_Formal
-- Kill_Elaboration_Checks
-- Low_Bound_Tested
@@ -5130,6 +5166,7 @@ package Einfo is
-- May_Inherit_Delayed_Rep_Aspects
-- Must_Be_On_Byte_Boundary
-- Must_Have_Preelab_Init
+ -- Needs_Construction
-- Optimize_Alignment_Space
-- Optimize_Alignment_Time
-- Partial_View_Has_Unknown_Discr
@@ -5211,7 +5248,6 @@ package Einfo is
-- Associated_Storage_Pool (root type only)
-- Finalization_Collection (root type only)
-- Storage_Size_Variable (base type only)
- -- Has_Pragma_Controlled (base type only)
-- Has_Storage_Size_Clause (base type only)
-- Is_Access_Constant
-- Is_Local_Anonymous_Access
@@ -5529,6 +5565,7 @@ package Einfo is
-- Digits_Value
-- Float_Rep (Float_Rep_Kind)
-- Default_Aspect_Value (base type only)
+ -- Is_IEEE_Extended_Precision
-- Scalar_Range
-- Static_Real_Or_String_Predicate
-- Machine_Emax_Value (synth)
@@ -5611,7 +5648,7 @@ package Einfo is
-- Is_Abstract_Subprogram (non-generic case only)
-- Is_Called (non-generic case only)
-- Is_Class_Wide_Wrapper
- -- Is_Constructor
+ -- Is_CPP_Constructor
-- Is_CUDA_Kernel (non-generic case only)
-- Is_DIC_Procedure (non-generic case only)
-- Is_Discrim_SO_Function
@@ -5757,6 +5794,8 @@ package Einfo is
-- Non_Binary_Modulus (base type only)
-- Has_Biased_Representation
-- Has_Shift_Operator (base type only)
+ -- Has_Modular_Operations (synth)
+ -- Has_Overflow_Operations (synth)
-- Has_Unsigned_Base_Range_Aspect (base type only)
-- No_Predicate_On_Actual
-- No_Dynamic_Predicate_On_Actual
@@ -5973,6 +6012,7 @@ package Einfo is
-- Is_Called (non-generic case only)
-- Is_Class_Wide_Wrapper
-- Is_Constructor
+ -- Is_CPP_Constructor
-- Is_CUDA_Kernel
-- Is_Destructor (non-generic case only)
-- Is_DIC_Procedure (non-generic case only)
@@ -6143,8 +6183,8 @@ package Einfo is
-- Scalar_Range
-- Static_Discrete_Predicate
-- Has_Biased_Representation
+ -- Has_Overflow_Operations (synth)
-- Has_Shift_Operator (base type only)
- -- Has_Unsigned_Base_Range_Aspect (base type only)
-- No_Predicate_On_Actual
-- No_Dynamic_Predicate_On_Actual
-- Type_Low_Bound (synth)