blob: 0239a702659b3b746eaeac243f45049256724690 [file] [log] [blame]
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- E I N F O --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2021, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING3. If not, go to --
-- http://www.gnu.org/licenses for a complete copy of the license. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
pragma Warnings (Off); -- with/use clauses for children
with Namet; use Namet;
with Snames; use Snames;
with Stand; use Stand;
with Types; use Types;
with Uintp; use Uintp;
with Urealp; use Urealp;
pragma Warnings (On);
package Einfo is
-- This package documents the annotations to the abstract syntax tree that are
-- needed to support semantic processing of an Ada compilation.
-- See the spec of Gen_IL.Gen for instructions on making changes to this file.
-- Note that the official definition of what entities have what fields is in
-- Gen_IL.Gen.Gen_Entities; if there is a discrepancy between that and the
-- comments here, Gen_IL.Gen.Gen_Entities wins.
-- These annotations are for the most part attributes of declared entities,
-- and they correspond to conventional symbol table information. Other
-- attributes include sets of meanings for overloaded names, possible
-- types for overloaded expressions, flags to indicate deferred constants,
-- incomplete types, etc. These attributes are stored in fields in
-- tree nodes.
-- There are two kinds of semantic information
-- First, the tree nodes with the following Nkind values:
-- N_Defining_Identifier
-- N_Defining_Character_Literal
-- N_Defining_Operator_Symbol
-- are called Entities, and constitute the information that would often
-- be stored separately in a symbol table. These nodes are all extended
-- to provide extra space, and contain fields which depend on the entity
-- kind, as defined by the contents of the Ekind field. The use of the
-- Ekind field, and the associated fields in the entity, are defined
-- in this package, as are the access functions to these fields.
-- Second, in some cases semantic information is stored directly in other
-- kinds of nodes, e.g. the Etype field, used to indicate the type of an
-- expression. These fields are defined in the Sinfo package, but their
-- full documentation is in the Einfo package specification.
-- Declaration processing places information in the nodes of their defining
-- identifiers. Name resolution places in all other occurrences of an
-- identifier a pointer to the corresponding defining occurrence.
----------------------------------
-- Handling of Type'Size Values --
----------------------------------
-- The Ada 95 RM contains some rather peculiar (to us) rules on the value
-- of type'Size (see RM 13.3(55)). We have found that attempting to use
-- these RM Size values generally, and in particular for determining the
-- default size of objects, creates chaos, and major incompatibilities in
-- existing code.
-- The Ada 2022 RM acknowledges it and adopts GNAT's Object_Size attribute
-- for determining the default size of objects, but stops short of applying
-- it universally like GNAT. Indeed the notable exceptions are nonaliased
-- stand-alone objects, which are not covered by Object_Size in Ada 2022.
-- We proceed as follows, for discrete and fixed-point subtypes, we have
-- two separate sizes for each subtype:
-- The Object_Size, which is used for determining the default size of
-- objects and components. This size value can be referred to using the
-- Object_Size attribute. The phrase "is used" here means that it is
-- the basis of the determination of the size. The back end is free to
-- pad this up if necessary for efficiency, e.g. an 8-bit stand-alone
-- character might be stored in 32 bits on a machine with no efficient
-- byte access instructions such as the Alpha.
-- The default rules for the value of Object_Size are as follows:
-- The Object_Size for base subtypes reflect the natural hardware
-- size in bits (see Ttypes and Cstand for integer types). For
-- enumeration and fixed-point base subtypes have 8, 16, 32, or 64
-- bits for this size, depending on the range of values to be stored.
-- The Object_Size of a subtype is the same as the Object_Size of
-- the subtype from which it is obtained.
-- The Object_Size of a derived base type is copied from the parent
-- base type, and the Object_Size of a derived first subtype is copied
-- from the parent first subtype.
-- The Ada 2022 RM defined attribute Object_Size uses this implementation.
-- The Value_Size, which is the number of bits required to store a value
-- of the type. This size can be referred to using the Value_Size
-- attribute. This value is used for determining how tightly to pack
-- records or arrays with components of this type, and also affects
-- the semantics of unchecked conversion (unchecked conversions where
-- the Value_Size values differ generate a warning, and are potentially
-- target dependent).
-- The default rules for the value of Value_Size are as follows:
-- The Value_Size for a base subtype is the minimum number of bits
-- required to store all values of the type (including the sign bit
-- only if negative values are possible).
-- If a subtype statically matches the first subtype, then it has
-- by default the same Value_Size as the first subtype. This is a
-- consequence of RM 13.1(14) ("if two subtypes statically match,
-- then their subtype-specific aspects are the same".)
-- All other subtypes have a Value_Size corresponding to the minimum
-- number of bits required to store all values of the subtype. For
-- dynamic bounds, it is assumed that the value can range down or up
-- to the corresponding bound of the ancestor.
-- The Ada 95 RM defined attribute Size is identified with Value_Size.
-- The Size attribute may be defined for a first-named subtype. This sets
-- the Value_Size of the first-named subtype to the given value, and the
-- Object_Size of this first-named subtype to the given value padded up
-- to an appropriate boundary. It is a consequence of the default rules
-- above that this Object_Size will apply to all further subtypes. On the
-- other hand, Value_Size is affected only for the first subtype, any
-- dynamic subtypes obtained from it directly, and any statically matching
-- subtypes. The Value_Size of any other static subtypes is not affected.
-- Value_Size and Object_Size may be explicitly set for any subtype using
-- an attribute definition clause. Note that the use of such a clause can
-- cause the RM 13.1(14) rule to be violated, in Ada 95 and 2022 for the
-- Value_Size attribute, but only in Ada 95 for the Object_Size attribute.
-- If access types reference aliased objects whose subtypes have differing
-- Object_Size values as a result of explicit attribute definition clauses,
-- then it is erroneous to convert from one access subtype to the other.
-- At the implementation level, the Esize field stores the Object_Size
-- and the RM_Size field stores the Value_Size (hence the value of the
-- Size attribute, which, as noted above, is equivalent to Value_Size).
-- To get a feel for the difference, consider the following examples (note
-- that in each case the base is short_short_integer with a size of 8):
-- Object_Size Value_Size
-- type x1 is range 0..5; 8 3
-- type x2 is range 0..5;
-- for x2'size use 12; 16 12
-- subtype x3 is x2 range 0 .. 3; 16 2
-- subtype x4 is x2'base range 0 .. 10; 8 4
-- dynamic : x2'Base range -64 .. +63;
-- subtype x5 is x2 range 0 .. dynamic; 16 3*
-- subtype x6 is x2'base range 0 .. dynamic; 8 7*
-- Note: the entries marked * are not actually specified by the Ada 95 RM,
-- but it seems in the spirit of the RM rules to allocate the minimum number
-- of bits known to be large enough to hold the given range of values.
-- So far, so good, but GNAT has to obey the RM rules, so the question is
-- under what conditions must the RM Size be used. The following is a list
-- of the occasions on which the RM Size must be used:
-- Component size for packed arrays or records
-- Value of the attribute Size for a type
-- Warning about sizes not matching for unchecked conversion
-- The RM_Size field keeps track of the RM Size as needed in these
-- three situations.
-- For elementary types other than discrete and fixed-point types, the
-- Object_Size and Value_Size are the same (and equivalent to the RM
-- attribute Size). Only Size may be specified for such types.
-- For composite types, Object_Size and Value_Size are computed from their
-- respective value for the type of each element as well as the layout.
-- All size attributes are stored as Uint values. Negative values are used to
-- reference GCC expressions for the case of non-static sizes, as explained
-- in Repinfo.
--------------------------------------
-- Delayed Freezing and Elaboration --
--------------------------------------
-- The flag Has_Delayed_Freeze indicates that an entity carries an explicit
-- freeze node, which appears later in the expanded tree.
-- a) The flag is used by the front end to trigger expansion activities which
-- include the generation of that freeze node. Typically this happens at the
-- end of the current compilation unit, or before the first subprogram body is
-- encountered in the current unit. See units Freeze and Exp_Ch13 for details
-- on the actions triggered by a freeze node, which include the construction
-- of initialization procedures and dispatch tables.
-- b) The presence of a freeze node on an entity is used by the back end to
-- defer elaboration of the entity until its freeze node is seen. In the
-- absence of an explicit freeze node, an entity is frozen (and elaborated)
-- at the point of declaration.
-- For object declarations, the flag is set when an address clause for the
-- object is encountered. Legality checks on the address expression only take
-- place at the freeze point of the object. In Ada 2012, the flag is also set
-- when an address aspect for the object is encountered.
-- Most types have an explicit freeze node, because they cannot be elaborated
-- until all representation and operational items that apply to them have been
-- analyzed. Private types and incomplete types have the flag set as well, as
-- do task and protected types.
-- Implicit base types created for type derivations, as well as class-wide
-- types created for all tagged types, have the flag set.
-- If a subprogram has an access parameter whose designated type is incomplete
-- the subprogram has the flag set.
-----------------------
-- Entity Attributes --
-----------------------
-- This section contains a complete list of the attributes that are defined
-- on entities. Some attributes apply to all entities, others only to certain
-- kinds of entities. In the latter case the attribute should only be set or
-- accessed if the Ekind field indicates an appropriate entity.
-- There are two kinds of attributes that apply to entities, stored and
-- synthesized. Stored attributes correspond to a field or flag in the entity
-- itself. Such attributes are identified in the table below by giving the
-- field or flag in the attribute that is used to hold the attribute value.
-- Synthesized attributes are not stored directly, but are rather computed as
-- needed from other attributes, or from information in the tree. These are
-- marked "synthesized" in the table below. The stored attributes have both
-- access functions and set procedures to set the corresponding values, while
-- synthesized attributes have only access functions.
-- Note: in the case of Node, Uint, or Elist fields, there are cases where the
-- same physical field is used for different purposes in different entities,
-- so these access functions should only be referenced for the class of
-- entities in which they are defined as being present. Flags are not
-- overlapped in this way, but nevertheless as a matter of style and
-- abstraction (which may or may not be checked by assertions in the
-- body), this restriction should be observed for flag fields as well.
-- Note: certain of the attributes on types apply only to base types, and
-- are so noted by the notation [base type only]. These are cases where the
-- attribute of any subtype is the same as the attribute of the base type.
-- The attribute can be referenced on a subtype (and automatically retrieves
-- the value from the base type). However, it is an error to try to set the
-- attribute on other than the base type, and if assertions are enabled,
-- an attempt to set the attribute on a subtype will raise an assert error.
-- Other attributes are noted as applying to the [implementation base type
-- only]. These are representation attributes which must always apply to a
-- full non-private type, and where the attributes are always on the full
-- type. The attribute can be referenced on a subtype (and automatically
-- retrieves the value from the implementation base type). However, it is an
-- error to try to set the attribute on other than the implementation base
-- type.
-- Other attributes are noted as applying to the [root type only]. The
-- attribute can be referenced on a subtype (and automatically retrieves the
-- value from the root type). However, it is an error to try to set the
-- attribute on other than the root type.
-- The definitive definition of what is [... type only] is in Gen_Entities.
-- See calls to Sm passing Base_Type_Only, Impl_Base_Type_Only, or
-- Root_Type_Only.
-- Abstract_States
-- Defined for E_Package entities. Contains a list of all the abstract
-- states declared by the related package.
-- Accept_Address
-- Defined in entries. If an accept has a statement sequence, then an
-- address variable is created, which is used to hold the address of the
-- parameters, as passed by the runtime. Accept_Address holds an element
-- list which represents a stack of entities for these address variables.
-- The current entry is the top of the stack, which is the last element
-- on the list. A stack is required to handle the case of nested select
-- statements referencing the same entry.
-- Access_Disp_Table [implementation base type only]
-- Defined in E_Record_Type and E_Record_Subtype entities. Set in tagged
-- types to point to their dispatch tables. The first two entities are
-- associated with the primary dispatch table: 1) primary dispatch table
-- with user-defined primitives 2) primary dispatch table with predefined
-- primitives. For each interface type covered by the tagged type we also
-- have: 3) secondary dispatch table with thunks of primitives covering
-- user-defined interface primitives, 4) secondary dispatch table with
-- thunks of predefined primitives, 5) secondary dispatch table with user
-- defined primitives, and 6) secondary dispatch table with predefined
-- primitives. The last entity of this list is an access type declaration
-- used to expand dispatching calls through the primary dispatch table.
-- For an untagged record, contains No_Elist.
-- Access_Disp_Table_Elab_Flag [implementation base type only]
-- Defined in E_Record_Type and E_Record_Subtype entities. Set in tagged
-- types whose dispatch table elaboration must be completed at run time
-- by the IP routine to point to its pending elaboration flag entity.
-- This flag is needed when the elaboration of the dispatch table relies
-- on attribute 'Position applied to an object of the type; it is used by
-- the IP routine to avoid performing this elaboration twice.
-- Access_Subprogram_Wrapper
-- Entity created for access_to_subprogram types that have pre/post
-- conditions. Wrapper subprogram is created when analyzing corresponding
-- aspect, and inherits said aspects. Body of subprogram includes code
-- to check contracts, and a direct call to the designated subprogram.
-- The body is part of the freeze actions for the type.
-- The Subprogram_Type created for the Access_To_Subprogram carries the
-- Access_Subprogram_Wrapper for use in the expansion of indirect calls.
-- Activation_Record_Component
-- Defined for E_Variable, E_Constant, E_Loop_Parameter, and formal
-- parameter entities. Used in Opt.Unnest_Subprogram_Mode, in which case
-- a reference to an uplevel entity produces a corresponding component
-- in the generated ARECnT activation record (Exp_Unst for details).
-- Actual_Subtype
-- Defined in variables, constants, and formal parameters. This is the
-- subtype imposed by the value of the object, as opposed to its nominal
-- subtype, which is imposed by the declaration. The actual subtype
-- differs from the nominal one when the latter is indefinite (as in the
-- case of an unconstrained formal parameter, or a variable declared
-- with an unconstrained type and an initial value). The nominal subtype
-- is the Etype entry for the entity. The Actual_Subtype field is set
-- only if the actual subtype differs from the nominal subtype. If the
-- actual and nominal subtypes are the same, then the Actual_Subtype
-- field is Empty, and Etype indicates both types.
--
-- For objects, the Actual_Subtype is set only if this is a discriminated
-- type. For arrays, the bounds of the expression are obtained and the
-- Etype of the object is directly the constrained subtype. This is
-- rather irregular, and the semantic checks that depend on the nominal
-- subtype being unconstrained use flag Is_Constr_Subt_For_U_Nominal(qv).
-- Address_Clause (synthesized)
-- Applies to entries, objects and subprograms. Set if an address clause
-- is present which references the object or subprogram and points to
-- the N_Attribute_Definition_Clause node. Empty if no Address clause.
-- The expression in the address clause is always a constant that is
-- defined before the entity to which the address clause applies.
-- Note: The backend references this field in E_Task_Type entities???
-- Address_Taken
-- Defined in all entities. Set if the Address or Unrestricted_Access
-- attribute is applied directly to the entity, i.e. the entity is the
-- entity of the prefix of the attribute reference. Also set if the
-- entity is the second argument of an Asm_Input or Asm_Output attribute,
-- as the construct may entail taking its address. And also set if the
-- entity is a subprogram and the Access or Unchecked_Access attribute is
-- applied. Used by the backend to make sure that the address can be
-- meaningfully taken, and also in the case of subprograms to control
-- output of certain warnings.
-- Aft_Value (synthesized)
-- Applies to fixed-point types and subtypes. This yields the value of
-- the Aft attribute for the type, i.e. the number of decimal digits
-- needed after the decimal point to accommodate the delta of the type,
-- unless the delta is greater than 0.1, in which case it is 1.
-- Alias
-- Defined in overloadable entities (literals, subprograms, entries) and
-- subprograms that cover a primitive operation of an abstract interface
-- (that is, subprograms with the Interface_Alias attribute). In case of
-- overloaded entities it points to the parent subprogram of a derived
-- subprogram. In case of abstract interface subprograms it points to the
-- subprogram that covers the abstract interface primitive. Also used for
-- a subprogram renaming, where it points to the renamed subprogram. For
-- an inherited operation (of a type extension) that is overridden in a
-- private part, the Alias is the overriding operation. In this fashion a
-- call from outside the package ends up executing the new body even if
-- non-dispatching, and a call from inside calls the overriding operation
-- because it hides the implicit one. Alias is always empty for entries.
-- Alignment
-- Defined in entities for types and also in constants, variables
-- (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.
-- Alignment_Clause (synthesized)
-- Applies to all entities for types and objects. If an alignment
-- attribute definition clause is present for the entity, then this
-- function returns the N_Attribute_Definition clause that specifies the
-- alignment. If no alignment clause applies to the type, then the call
-- to this function returns Empty. Note that the call can return a
-- non-Empty value even if Has_Alignment_Clause is not set (happens with
-- subtype and derived type declarations). Note also that a record
-- definition clause with an (obsolescent) mod clause is converted
-- into an attribute definition clause for this purpose.
-- Anonymous_Designated_Type
-- Defined in variables which represent anonymous finalization masters.
-- Contains the designated type which is being serviced by the master.
-- Anonymous_Masters
-- Defined in packages, subprograms, and subprogram bodies. Contains a
-- list of anonymous finalization masters declared within the related
-- unit. The list acts as a mapping between a master and a designated
-- type.
-- Anonymous_Object
-- Present in protected and task type entities. Contains the entity of
-- the anonymous object created for a single protected or task type.
-- Associated_Entity
-- Defined in all entities. This field is similar to Associated_Node, but
-- applied to entities. The attribute links an entity from the generic
-- template with its corresponding entity in the analyzed generic copy.
-- The global references mechanism relies on the Associated_Entity to
-- infer the context.
-- Associated_Formal_Package
-- Defined in packages that are the actuals of formal_packages. Points
-- to the entity in the declaration for the formal package.
-- Associated_Node_For_Itype
-- Defined in all type and subtype entities. Set non-Empty only for
-- Itypes. Set to point to the associated node for the Itype, i.e.
-- the node whose elaboration generated the Itype. This is used for
-- copying trees, to determine whether or not to copy an Itype, and
-- also for accessibility checks on anonymous access types. This
-- node is typically an object declaration, component declaration,
-- type or subtype declaration.
-- For an access discriminant in a type declaration, the associated_
-- node_for_itype is the corresponding discriminant specification.
-- For an access parameter it is the enclosing subprogram declaration.
-- For an access_to_protected_subprogram parameter it is the declaration
-- of the corresponding formal parameter.
--
-- Itypes have no explicit declaration, and therefore are not attached to
-- the tree: their Parent field is always empty. The Associated_Node_For_
-- Itype is the only way to determine the construct that leads to the
-- creation of a given itype entity.
-- Associated_Storage_Pool [root type only]
-- Defined in simple and general access type entities. References the
-- storage pool to be used for the corresponding collection. A value of
-- Empty means that the default pool is to be used. This is defined
-- only in the root type, since derived types must have the same pool
-- as the parent type.
-- Barrier_Function
-- Defined in protected entries and entry families. This is the
-- subprogram declaration for the body of the function that returns
-- the value of the entry barrier.
-- Base_Type (synthesized)
-- Applies to all type and subtype entities. Returns the base type of a
-- type or subtype. The base type of a type is the type itself. The base
-- type of a subtype is the type that it constrains (which is always
-- a type entity, not some other subtype). Note that in the case of a
-- subtype of a private type, it is possible for the base type attribute
-- to return a private type, even if the subtype to which it applies is
-- non-private. See also Implementation_Base_Type. Note: it is allowed to
-- apply Base_Type to other than a type, in which case it simply returns
-- the entity unchanged.
-- Block_Node
-- Defined in block entities. Points to the identifier in the
-- Block_Statement itself. Used when retrieving the block construct
-- for finalization purposes, the block entity has an implicit label
-- declaration in the enclosing declarative part, and has otherwise
-- no direct connection in the tree with the block statement. The
-- link is to the identifier (which is an occurrence of the entity)
-- and not to the block_statement itself, because the statement may
-- be rewritten, e.g. in the process of removing dead code.
-- Body_Entity
-- Defined in package and generic package entities, points to the
-- corresponding package body entity if one is present.
-- Body_Needed_For_SAL
-- Defined in package and subprogram entities that are compilation
-- units. Indicates that the source for the body must be included
-- when the unit is part of a standalone library.
-- Body_Needed_For_Inlining
-- Defined in package entities that are compilation units. Used to
-- determine whether the body unit needs to be compiled when the
-- package declaration appears in the list of units to inline. A body
-- is needed for inline processing if the unit declaration contains
-- functions that carry pragma Inline or Inline_Always, or if it
-- contains a generic unit that requires a body.
--
-- Body_References
-- Defined in abstract state entities. Contains an element list of
-- references (identifiers) that appear in a package body whose spec
-- defines the related state. If the body refines the said state, all
-- references on this list are illegal due to the visible refinement.
-- BIP_Initialization_Call
-- Defined in constants and variables whose corresponding declaration
-- is wrapped in a transient block and the inital value is provided by
-- a build-in-place function call. Contains the relocated build-in-place
-- call after the expansion has decoupled the call from the object. This
-- attribute is used by the finalization machinery to insert cleanup code
-- for all additional transient objects found in the transient block.
-- C_Pass_By_Copy [implementation base type only]
-- Defined in record types. Set if a pragma Convention for the record
-- type specifies convention C_Pass_By_Copy. This convention name is
-- treated as identical in all respects to convention C, except that
-- if it is specified for a record type, then the C_Pass_By_Copy flag
-- is set, and if a foreign convention subprogram has a formal of the
-- corresponding type, then the parameter passing mechanism will be
-- set to By_Copy (unless specifically overridden by an Import or
-- Export pragma).
-- Can_Never_Be_Null
-- This flag is defined in all entities. It is set in an object which can
-- never have a null value. Set for constant access values initialized to
-- a non-null value. This is also set for all access parameters in Ada 83
-- and Ada 95 modes, and for access parameters that explicitly exclude
-- null in Ada 2005 mode.
--
-- This is used to avoid unnecessary resetting of the Is_Known_Non_Null
-- flag for such entities. In Ada 2005 mode, this is also used when
-- determining subtype conformance of subprogram profiles to ensure
-- that two formals have the same null-exclusion status.
--
-- This is also set on some access types, e.g. the Etype of the anonymous
-- access type of a controlling formal.
-- Can_Use_Internal_Rep [base type only]
-- Defined in Access_Subprogram_Kind nodes. This flag is set by the
-- front end and used by the backend. False means that the backend
-- must represent the type in the same way as Convention-C types (and
-- other foreign-convention types). On many targets, this means that
-- the backend will use dynamically generated trampolines for nested
-- subprograms. True means that the backend can represent the type in
-- some internal way. On the aforementioned targets, this means that the
-- backend will not use dynamically generated trampolines. This flag
-- must be False if Has_Foreign_Convention is True; otherwise, the front
-- end is free to set the policy.
--
-- Setting this False in all cases corresponds to the traditional back
-- end strategy, where all access-to-subprogram types are represented the
-- same way, independent of the Convention. For further details, see also
-- Always_Compatible_Rep in Targparm.
--
-- Efficiency note: On targets that use dynamically generated
-- trampolines, False generally favors efficiency of top-level
-- subprograms, whereas True generally favors efficiency of nested
-- ones. On other targets, this flag has little or no effect on
-- efficiency. The front end should take this into account. In
-- particular, pragma Favor_Top_Level gives a hint that the flag
-- should be False.
--
-- Note: We considered using Convention-C for this purpose, but we need
-- this separate flag, because Convention-C implies that in the case of
-- P'[Unrestricted_]Access, P also have convention C. Sometimes we want
-- to have Can_Use_Internal_Rep False for an access type, but allow P to
-- have convention Ada.
-- Chars
-- Defined in all entities. This field contains an entry into the names
-- table that has the character string of the identifier, character
-- literal or operator symbol. See Namet for further details. Note that
-- throughout the processing of the front end, this name is the simple
-- unqualified name. However, just before the backend is called, a call
-- is made to Qualify_All_Entity_Names. This causes entity names to be
-- qualified using the encoding described in exp_dbug.ads, and from that
-- point (including post backend steps, e.g. cross-reference generation),
-- the entities will contain the encoded qualified names.
-- Checks_May_Be_Suppressed
-- Defined in all entities. Set if a pragma Suppress or Unsuppress
-- mentions the entity specifically in the second argument. If this
-- flag is set the Global_Entity_Suppress and Local_Entity_Suppress
-- tables must be consulted to determine if there actually is an active
-- Suppress or Unsuppress pragma that applies to the entity.
-- Class_Postconditions
-- Defined on subprogram entities. Set if the subprogram has class-wide
-- postconditions. Denotes the (and-then) expression built by merging
-- inherited class-wide postconditions with its own class-wide
-- postconditions.
-- Class_Preconditions
-- Defined on subprogram entities. Set if the subprogram has class-wide
-- preconditions. Denotes the (or-else) expression built by merging
-- inherited class-wide preconditions with its own class-wide
-- preconditions.
-- Class_Preconditions_Subprogram
-- Defined on subprogram entities. Set on subprogram helpers and also on
-- the indirect-call wrapper internally built for subprograms that have
-- class-wide preconditions. References the subprogram that has the
-- class-wide preconditions.
-- Class_Wide_Type
-- Defined in all type entities. For a tagged type or subtype, returns
-- the corresponding implicitly declared class-wide type. For a
-- class-wide type, returns itself. Set to Empty for untagged types.
-- Cloned_Subtype
-- Defined in E_Record_Subtype and E_Class_Wide_Subtype entities.
-- Each such entity can either have a Discriminant_Constraint, in
-- which case it represents a distinct type from the base type (and
-- will have a list of components and discriminants in the list headed by
-- First_Entity) or else no such constraint, in which case it will be a
-- copy of the base type.
--
-- o Each element of the list in First_Entity is copied from the base
-- type; in that case, this field is Empty.
--
-- o The list in First_Entity is shared with the base type; in that
-- case, this field points to that entity.
--
-- A record or classwide subtype may also be a copy of some other
-- subtype and share the entities in the First_Entity with that subtype.
-- In that case, this field points to that subtype.
--
-- For E_Class_Wide_Subtype, the presence of Equivalent_Type overrides
-- this field. Note that this field ONLY appears in subtype entities, not
-- in type entities, it is not defined, and it is an error to reference
-- Cloned_Subtype in an E_Record_Type or E_Class_Wide_Type entity.
-- Comes_From_Source
-- This flag appears on all nodes, including entities, and indicates
-- that the node was created by the scanner or parser from the original
-- source. Thus for entities, it indicates that the entity is defined
-- in the original source program.
-- Component_Alignment (special field) [base type only]
-- Defined in array and record entities. Contains a value of type
-- Component_Alignment_Kind indicating the alignment of components.
-- Set to Calign_Default normally, but can be overridden by use of
-- the Component_Alignment pragma. Note: this field is currently
-- stored in a non-standard way, see body for details.
-- Component_Bit_Offset
-- Defined in record components (E_Component, E_Discriminant). First
-- bit position of given component, computed from the first bit and
-- position values given in the component clause. A value of No_Uint
-- means that the value is not yet known. The value can be set by the
-- appearance of an explicit component clause in a record representation
-- clause, or it can be set by the front-end in package Layout, or it can
-- be set by the backend. By the time backend processing is completed,
-- this field is always set. A negative value is used to represent
-- a value which is not known at compile time, and must be computed
-- at run-time (this happens if fields of a record have variable
-- lengths). See package Repinfo for details of these values.
--
-- Note: Component_Bit_Offset is redundant with respect to the fields
-- Normalized_First_Bit and Normalized_Position, and could in principle
-- be eliminated, but it is convenient in several situations, including
-- use in the backend, to have this redundant field.
-- Component_Clause
-- Defined in record components and discriminants. If a record
-- representation clause is present for the corresponding record type a
-- that specifies a position for the component, then the Component_Clause
-- field of the E_Component entity points to the N_Component_Clause node.
-- Set to Empty if no record representation clause was present, or if
-- there was no specification for this component.
-- Component_Size [implementation base type only]
-- Defined in array types. It contains the component size value for
-- the array. A value of No_Uint means that the value is not yet set.
-- The value can be set by the use of a component size clause, or
-- by the front end in package Layout, or by the backend. A negative
-- value is used to represent a value which is not known at compile
-- time, and must be computed at run-time (this happens if the type
-- of the component has a variable length size). See package Repinfo
-- for details of these values. Component_Size can also be negative in
-- an illegal program that says e.g. "for T'Component_Size use -8;".
-- Component_Type [implementation base type only]
-- Defined in array types and string types. References component type.
-- Contains_Ignored_Ghost_Code
-- Defined in blocks, packages and their bodies, subprograms and their
-- bodies. Set if the entity contains any ignored Ghost code in the form
-- of declaration, procedure call, assignment statement or pragma.
-- Contract
-- Defined in constant, entry, entry family, operator, [generic] package,
-- package body, protected unit, [generic] subprogram, subprogram body,
-- variable, task unit, and type entities. Points to the contract of the
-- entity, holding various assertion items and data classifiers.
-- Contract_Wrapper
-- Defined in entry and entry family entities. Set only when the entry
-- [family] has contract cases, preconditions, and/or postconditions.
-- Contains the entity of a wrapper procedure which encapsulates the
-- original entry and implements precondition/postcondition semantics.
-- Corresponding_Concurrent_Type
-- Defined in record types that are constructed by the expander to
-- represent task and protected types (Is_Concurrent_Record_Type flag
-- set). Points to the entity for the corresponding task type or the
-- protected type.
-- Corresponding_Discriminant
-- Defined in discriminants of a derived type, when the discriminant is
-- used to constrain a discriminant of the parent type. Points to the
-- corresponding discriminant in the parent type. Otherwise it is Empty.
-- Corresponding_Equality
-- Defined in function entities for implicit inequality operators.
-- Denotes the explicit or derived equality operation that creates
-- the implicit inequality. Note that this field is not present in
-- other function entities, only in implicit inequality routines,
-- where Comes_From_Source is always False.
-- Corresponding_Function
-- Defined on procedures internally built with an extra out parameter
-- to return a constrained array type, when Modify_Tree_For_C is set.
-- Denotes the function that returns the constrained array type for
-- which this procedure was built.
-- Corresponding_Procedure
-- Defined on functions that return a constrained array type, when
-- Modify_Tree_For_C is set. Denotes the internally built procedure
-- with an extra out parameter created for it.
-- Corresponding_Record_Component
-- Defined in components of a derived untagged record type, including
-- discriminants. For a regular component or a stored discriminant,
-- points to the corresponding component in the parent type. Set to
-- Empty for a non-stored discriminant. It is used by the back end to
-- ensure the layout of the derived type matches that of the parent
-- type when there is no representation clause on the derived type.
-- Corresponding_Record_Type
-- Defined in protected and task types and subtypes. References the
-- entity for the corresponding record type constructed by the expander
-- (see Exp_Ch9). This type is used to represent values of the task type.
-- Corresponding_Remote_Type
-- Defined in record types that describe the fat pointer structure for
-- Remote_Access_To_Subprogram types. References the original access
-- to subprogram type.
-- CR_Discriminant
-- Defined in discriminants of concurrent types. Denotes the homologous
-- discriminant of the corresponding record type. The CR_Discriminant is
-- created at the same time as the discriminal, and used to replace
-- occurrences of the discriminant within the type declaration.
-- Current_Use_Clause
-- Defined in packages and in types. For packages, denotes the use
-- package clause currently in scope that makes the package use_visible.
-- For types, it denotes the use_type clause that makes the operators of
-- the type visible. Used for more precise warning messages on redundant
-- use clauses.
-- Current_Value
-- Defined in all object entities. Set in E_Variable, E_Constant, formal
-- parameters and E_Loop_Parameter entities if we have trackable current
-- values. Set non-Empty if the (constant) current value of the variable
-- is known. This value is valid only for references from the same
-- sequential scope as the entity. The sequential scope of an entity
-- includes the immediate scope and any contained scopes that are package
-- specs, package bodies, blocks (at any nesting level) or statement
-- sequences in IF or loop statements.
--
-- Another related use of this field is to record information about the
-- value obtained from an IF or WHILE statement condition. If the IF or
-- ELSIF or WHILE condition has the form "NOT {,NOT] OBJ RELOP VAL ",
-- or OBJ [AND [THEN]] expr, where OBJ refers to an entity with a
-- Current_Value field, RELOP is one of the six relational operators, and
-- VAL is a compile-time known value then the Current_Value field of OBJ
-- points to the N_If_Statement, N_Elsif_Part, or N_Iteration_Scheme node
-- of the relevant construct, and the Condition field of this can be
-- consulted to give information about the value of OBJ. For more details
-- on this usage, see the procedure Exp_Util.Get_Current_Value_Condition.
-- Debug_Info_Off
-- Defined in all entities. Set if a pragma Suppress_Debug_Info applies
-- to the entity, or if internal processing in the compiler determines
-- that suppression of debug information is desirable. Note that this
-- flag is only for use by the front end as part of the processing for
-- determining if Needs_Debug_Info should be set. The backend should
-- always test Needs_Debug_Info, it should never test Debug_Info_Off.
-- Debug_Renaming_Link
-- Used to link the variable associated with a debug renaming declaration
-- to the renamed entity. See Exp_Dbug.Debug_Renaming_Declaration for
-- details of the use of this field.
-- Declaration_Node (synthesized)
-- Applies to all entities. Returns the tree node for the construct that
-- declared the entity. Normally this is just the Parent of the entity.
-- One exception arises with child units, where the parent of the entity
-- is a selected component/defining program unit name. Another exception
-- is that if the entity is an incomplete type that has been completed or
-- a private type, then we obtain the declaration node denoted by the
-- full type, i.e. the full type declaration node. Also note that for
-- subprograms, this returns the {function,procedure}_specification, not
-- the subprogram_declaration. If the parent of an Itype is a type or
-- subtype declaration, we return the declaration node as for any other
-- type. For other Itypes, we return Empty.
-- Default_Aspect_Component_Value [base type only]
-- Defined in array types. Holds the static value specified in a
-- Default_Component_Value aspect specification for the array type,
-- or inherited on derivation.
-- Default_Aspect_Value [base type only]
-- Defined in scalar types. Holds the static value specified in a
-- Default_Value aspect specification for the type, or inherited
-- on derivation.
-- Default_Expr_Function
-- Defined in parameters. It holds the entity of the parameterless
-- function that is built to evaluate the default expression if it is
-- more complex than a simple identifier or literal. For the latter
-- simple cases or if there is no default value, this field is Empty.
-- Default_Expressions_Processed
-- A flag in subprograms (functions, operators, procedures) and in
-- entries and entry families used to indicate that default expressions
-- have been processed and to avoid multiple calls to process the
-- default expressions (see Freeze.Process_Default_Expressions), which
-- would not only waste time, but also generate false error messages.
-- Default_Value
-- Defined in formal parameters. Points to the node representing the
-- expression for the default value for the parameter. Empty if the
-- parameter has no default value (which is always the case for OUT
-- and IN OUT parameters in the absence of errors).
-- Delay_Cleanups
-- Defined in entities that have finalization lists (subprograms
-- blocks, and tasks). Set if there are pending generic body
-- instantiations for the corresponding entity. If this flag is
-- set, then generation of cleanup actions for the corresponding
-- entity must be delayed, since the insertion of the generic body
-- may affect cleanup generation (see Inline for further details).
-- Delay_Subprogram_Descriptors
-- Defined in entities for which exception subprogram descriptors
-- are generated (subprograms, package declarations and package
-- bodies). Defined if there are pending generic body instantiations
-- for the corresponding entity. If this flag is set, then generation
-- of the subprogram descriptor for the corresponding enities must
-- be delayed, since the insertion of the generic body may add entries
-- to the list of handlers.
--
-- Note: for subprograms, Delay_Subprogram_Descriptors is set if and
-- only if Delay_Cleanups is set. But Delay_Cleanups can be set for a
-- a block (in which case Delay_Subprogram_Descriptors is set for the
-- containing subprogram). In addition Delay_Subprogram_Descriptors is
-- set for a library level package declaration or body which contains
-- delayed instantiations (in this case the descriptor refers to the
-- enclosing elaboration procedure).
-- Delta_Value
-- Defined in fixed and decimal types. Points to a universal real
-- that holds value of delta for the type, as given in the declaration
-- or as inherited by a subtype or derived type.
-- Dependent_Instances
-- Defined in packages that are instances. Holds list of instances
-- of inner generics. Used to place freeze nodes for those instances
-- after that of the current one, i.e. after the corresponding generic
-- bodies.
-- Depends_On_Private
-- Defined in all type entities. Set if the type is private or if it
-- depends on a private type.
-- Derived_Type_Link
-- Defined in all type and subtype entities. Set in a base type if
-- a derived type declaration is encountered which derives from
-- this base type or one of its subtypes, and there are already
-- primitive operations declared. In this case, it references the
-- entity for the type declared by the derived type declaration.
-- For example:
--
-- type R is ...
-- subtype RS is R ...
-- ...
-- type G is new RS ...
--
-- In this case, if primitive operations have been declared for R, at
-- the point of declaration of G, then the Derived_Type_Link of R is set
-- to point to the entity for G. This is used to generate warnings and
-- errors for rep clauses that appear later on for R, which might result
-- in an unexpected (or illegal) implicit conversion operation.
--
-- Note: if there is more than one such derived type, the link will point
-- to the last one.
-- Designated_Type (synthesized)
-- Applies to access types. Returns the designated type. Differs from
-- Directly_Designated_Type in that if the access type refers to an
-- incomplete type, and the full type is available, then this full type
-- is returned instead of the incomplete type.
-- DIC_Procedure (synthesized)
-- Defined in all type entities. Set for a private type and its full view
-- when the type is subject to pragma Default_Initial_Condition (DIC), or
-- when the type inherits a DIC pragma from a parent type. Points to the
-- entity of a procedure which takes a single argument of the given type
-- and verifies the assertion expression of the DIC pragma at run time.
-- Note: the reason this is marked as a synthesized attribute is that the
-- way this is stored is as an element of the Subprograms_For_Type field.
-- Digits_Value
-- Defined in floating point types and subtypes and decimal types and
-- subtypes. Contains the Digits value specified in the declaration.
-- Direct_Primitive_Operations
-- Defined in tagged types and subtypes (including synchronized types),
-- in tagged private types, and in tagged incomplete types. However, when
-- Extensions_Allowed is True (-gnatX), also defined for untagged types
-- (for support of the extension feature of prefixed calls for untagged
-- types). This field is an element list of entities for primitive
-- operations of the type. For incomplete types the list is always empty.
-- In order to follow the C++ ABI, entities of primitives that come from
-- source must be stored in this list in the order of their occurrence in
-- the sources. When expansion is disabled, the corresponding record type
-- of a synchronized type is not constructed. In that case, such types
-- carry this attribute directly.
-- Directly_Designated_Type
-- Defined in access types. This field points to the type that is
-- directly designated by the access type. In the case of an access
-- type to an incomplete type, this field references the incomplete
-- type. Directly_Designated_Type is typically used in implementing the
-- static semantics of the language; in implementing dynamic semantics,
-- we typically want the full view of the designated type. The function
-- Designated_Type obtains this full type in the case of access to an
-- incomplete type.
-- Disable_Controlled [base type only]
-- Present in all entities. Set for a controlled type subject to aspect
-- Disable_Controlled which evaluates to True. This flag is taken into
-- account in synthesized attribute Is_Controlled.
-- Discard_Names
-- Defined in types and exception entities. Set if pragma Discard_Names
-- applies to the entity. It is also set for declarative regions and
-- package specs for which a Discard_Names pragma with zero arguments
-- has been encountered. The purpose of setting this flag is to be able
-- to set the Discard_Names attribute on enumeration types declared
-- after the pragma within the same declarative region. This flag is
-- set to False if a Keep_Names pragma appears for an enumeration type.
-- Discriminal
-- Defined in discriminants (Discriminant formal: GNAT's first
-- coinage). The entity used as a formal parameter that corresponds
-- to a discriminant. See section "Handling of Discriminants" for
-- full details of the use of discriminals.
-- Discriminal_Link
-- Defined in E_In_Parameter or E_Constant entities. For discriminals,
-- points back to corresponding discriminant. For other entities, must
-- remain Empty.
-- Discriminant_Checking_Func
-- Defined in components. Points to the defining identifier of the
-- function built by the expander returns a Boolean indicating whether
-- the given record component exists for the current discriminant
-- values.
-- Discriminant_Constraint
-- Defined in entities whose Has_Discriminants flag is set (concurrent
-- types, subtypes, record types and subtypes, private types and
-- subtypes, limited private types and subtypes and incomplete types).
-- It is an error to reference the Discriminant_Constraint field if
-- Has_Discriminants is False.
--
-- If the Is_Constrained flag is set, Discriminant_Constraint points
-- to an element list containing the discriminant constraints in the
-- same order in which the discriminants are declared.
--
-- If the Is_Constrained flag is not set but the discriminants of the
-- unconstrained type have default initial values then this field
-- points to an element list giving these default initial values in
-- the same order in which the discriminants are declared. Note that
-- in this case the entity cannot be a tagged record type, because
-- discriminants in this case cannot have defaults.
--
-- If the entity is a tagged record implicit type, then this field is
-- inherited from the first subtype (so that the itype is subtype
-- conformant with its first subtype, which is needed when the first
-- subtype overrides primitive operations inherited by the implicit
-- base type).
--
-- In all other cases Discriminant_Constraint contains the empty
-- Elist (i.e. it is initialized with a call to New_Elmt_List).
-- Discriminant_Default_Value
-- Defined in discriminants. Points to the node representing the
-- expression for the default value of the discriminant. Set to
-- Empty if the discriminant has no default value.
-- Discriminant_Number
-- Defined in discriminants. Gives the ranking of a discriminant in
-- the list of discriminants of the type, i.e. a sequential integer
-- index starting at 1 and ranging up to number of discriminants.
-- Dispatch_Table_Wrappers [implementation base type only]
-- Defined in E_Record_Type and E_Record_Subtype entities. Set in library
-- level tagged type entities if we are generating statically allocated
-- dispatch tables. Points to the list of dispatch table wrappers
-- associated with the tagged type. For an untagged record, contains
-- No_Elist.
-- Dynamic_Call_Helper
-- Defined on subprogram entities. Set if the subprogram has class-wide
-- preconditions. Denotes the helper that evaluates at run time the
-- class-wide preconditions performing dispatching calls.
-- DTC_Entity
-- Defined in function and procedure entities. Set to Empty unless
-- the subprogram is dispatching in which case it references the
-- Dispatch Table pointer Component. For regular Ada tagged this, this
-- is the _Tag component. For CPP_Class types and their descendants,
-- this points to the component entity in the record that holds the
-- Vtable pointer for the Vtable containing the entry referencing the
-- subprogram.
-- DT_Entry_Count
-- Defined in E_Component entities. Only used for component marked
-- Is_Tag. Store the number of entries in the Vtable (or Dispatch Table)
-- DT_Offset_To_Top_Func
-- Defined in E_Component entities. Only used for component marked
-- Is_Tag. If present it stores the Offset_To_Top function used to
-- provide this value in tagged types whose ancestor has discriminants.
-- DT_Position
-- Defined in function and procedure entities which are dispatching
-- (should not be referenced without first checking that flag
-- Is_Dispatching_Operation is True). Contains the offset into
-- the Vtable for the entry that references the subprogram.
-- Ekind (Ekind)
-- Defined in all entities. Contains a value of the enumeration type
-- Entity_Kind declared in a subsequent section in this spec.
-- Elaborate_Body_Desirable
-- Defined in package entities. Set if the elaboration circuitry detects
-- a case where there is a package body that modifies one or more visible
-- entities in the package spec and there is no explicit Elaborate_Body
-- pragma for the package. This information is passed on to the binder,
-- which attempts, but does not promise, to elaborate the body as close
-- to the spec as possible.
-- Elaboration_Entity
-- Defined in entry, entry family, [generic] package, and subprogram
-- entities. This is a counter associated with the unit that is initially
-- set to zero, is incremented when an elaboration request for the unit
-- is made, and is decremented when a finalization request for the unit
-- is made. This is used for three purposes. First, it is used to
-- implement access before elaboration checks (the counter must be
-- non-zero to call a subprogram at elaboration time). Second, it is
-- used to guard against repeated execution of the elaboration code.
-- Third, it is used to ensure that the finalization code is executed
-- only after all clients have requested it.
--
-- Note that we always allocate this counter, and set this field, but
-- we do not always actually use it. It is only used if it is needed
-- for access before elaboration use (see Elaboration_Entity_Required
-- flag) or if either the spec or the body has elaboration code. If
-- neither of these two conditions holds, then the entity is still
-- allocated (since we don't know early enough whether or not there
-- is elaboration code), but is simply not used for any purpose.
-- Elaboration_Entity_Required
-- Defined in entry, entry family, [generic] package, and subprogram
-- entities. Set only if Elaboration_Entity is non-Empty to indicate that
-- the counter is required to be non-zero even if there is no other
-- elaboration code. This occurs when the Elaboration_Entity counter
-- is used for access before elaboration checks. If the counter is
-- only used to prevent multiple execution of the elaboration code,
-- then if there is no other elaboration code, obviously there is no
-- need to set the flag.
-- Encapsulating_State
-- Defined in abstract state, constant and variable entities. Contains
-- the entity of an ancestor state or a single concurrent type whose
-- refinement utilizes this item as a constituent.
-- Enclosing_Scope
-- Defined in labels. Denotes the innermost enclosing construct that
-- contains the label. Identical to the scope of the label, except for
-- labels declared in the body of an accept statement, in which case the
-- entry_name is the Enclosing_Scope. Used to validate goto's within
-- accept statements.
-- Entry_Accepted
-- Defined in E_Entry and E_Entry_Family entities. Set if there is
-- at least one accept for this entry in the task body. Used to
-- generate warnings for missing accepts.
-- Entry_Bodies_Array
-- Defined in protected types for which Has_Entries is true.
-- This is the defining identifier for the array of entry body
-- action procedures and barrier functions used by the runtime to
-- execute the user code associated with each entry.
-- Entry_Cancel_Parameter
-- Defined in blocks. This only applies to a block statement for
-- which the Is_Asynchronous_Call_Block flag is set. It
-- contains the defining identifier of an object that must be
-- passed to the Cancel_Task_Entry_Call or Cancel_Protected_Entry_Call
-- call in the cleanup handler added to the block by
-- Exp_Ch7.Expand_Cleanup_Actions. This parameter is a Boolean
-- object for task entry calls and a Communications_Block object
-- in the case of protected entry calls. In both cases the objects
-- are declared in outer scopes to this block.
-- Entry_Component
-- Defined in formal parameters (in, in out and out parameters). Used
-- only for formals of entries. References the corresponding component
-- of the entry parameter record for the entry.
-- Entry_Formal
-- Defined in components of the record built to correspond to entry
-- parameters. This field points from the component to the formal. It
-- is the back pointer corresponding to Entry_Component.
-- Entry_Index_Constant
-- Defined in an entry index parameter. This is an identifier that
-- eventually becomes the name of a constant representing the index
-- of the entry family member whose entry body is being executed. Used
-- to expand references to the entry index specification identifier.
-- Entry_Index_Type (synthesized)
-- Applies to an entry family. Denotes Etype of the subtype indication
-- in the entry declaration. Used to resolve the index expression in an
-- accept statement for a member of the family, and in the prefix of
-- 'COUNT when it applies to a family member.
-- Entry_Max_Queue_Lengths_Array
-- Defined in protected types for which Has_Entries is true. Contains the
-- defining identifier for the array of naturals used by the runtime to
-- limit the queue size of each entry individually.
-- Entry_Parameters_Type
-- Defined in entries. Points to the access-to-record type that is
-- constructed by the expander to hold a reference to the parameter
-- values. This reference is manipulated (as an address) by the
-- tasking runtime. The designated record represents a packaging
-- up of the entry parameters (see Exp_Ch9.Expand_N_Entry_Declaration
-- for further details). Entry_Parameters_Type is Empty if the entry
-- has no parameters.
-- Enumeration_Pos
-- Defined in enumeration literals. Contains the position number
-- corresponding to the value of the enumeration literal.
-- Enumeration_Rep
-- Defined in enumeration literals. Contains the representation that
-- corresponds to the value of the enumeration literal. Note that
-- this is normally the same as Enumeration_Pos except in the presence
-- of representation clauses, where Pos will still represent the
-- position of the literal within the type and Rep will have be the
-- value given in the representation clause.
-- Enumeration_Rep_Expr
-- Defined in enumeration literals. Points to the expression in an
-- associated enumeration rep clause that provides the representation
-- value for this literal. Empty if no enumeration rep clause for this
-- literal (or if rep clause does not have an entry for this literal,
-- an error situation). This is also used to catch duplicate entries
-- for the same literal.
-- Enum_Pos_To_Rep
-- Defined in enumeration types, but not enumeration subtypes. Set to
-- Empty unless the enumeration type has a non-standard representation,
-- i.e. at least one literal has a representation value different from
-- its position value. In this case, the alternative is the following:
-- if the representation is not contiguous, then Enum_Pos_To_Rep is the
-- entity for an array constant built when the type is frozen that maps
-- Pos values to corresponding Rep values, whose index type is Natural
-- and whose component type is the enumeration type itself; or else, if
-- the representation is contiguous, then Enum_Pos_To_Rep is the entity
-- of the index type defined above.
-- Equivalent_Type
-- Defined in class wide types and subtypes, access to protected
-- subprogram types, and in exception types. For a classwide type, it
-- is always Empty. For a class wide subtype, it points to an entity
-- created by the expander which gives the backend an understandable
-- equivalent of the class subtype with a known size (given by an
-- initial value). See Exp_Util.Expand_Class_Wide_Subtype for further
-- details. For E_Exception_Type, this points to the record containing
-- the data necessary to represent exceptions (for further details, see
-- System.Standard_Library). For access to protected subprograms, it
-- denotes a record that holds pointers to the operation and to the
-- protected object. For remote Access_To_Subprogram types, it denotes
-- the record that is the fat pointer representation of an RAST.
-- Esize
-- Defined in all types and subtypes, and also for components, constants,
-- and variables, including exceptions where it refers to the static data
-- allocated for an exception. Contains the Object_Size of the type or of
-- the object. A value of zero indicates that the value is not yet known.
--
-- For the case of components where a component clause is present, the
-- value is the value from the component clause, which must be non-
-- negative (but may be zero, which is acceptable for the case of
-- a type with only one possible value). It is also possible for Esize
-- of a component to be set without a component clause defined, which
-- means that the component size is specified, but not the position.
-- See also RM_Size and the section on "Handling of Type'Size Values".
-- During backend processing, the value is back annotated for all zero
-- values, so that after the call to the backend, the value is set.
-- Etype
-- Defined in all entities. Represents the type of the entity, which
-- is itself another entity. For a type entity, points to the parent
-- type for a derived type, or if the type is not derived, points to
-- itself. For a subtype entity, Etype points to the base type. For
-- a class wide type, points to the corresponding specific type. For a
-- subprogram or subprogram type, Etype has the return type of a function
-- or is set to Standard_Void_Type to represent a procedure. The Etype
-- field of a package is also set to Standard_Void_Type.
--
-- Note one obscure case: for pragma Default_Storage_Pool (null), the
-- Etype of the N_Null node is Empty.
-- Extra_Accessibility
-- Defined in formal parameters in the non-generic case. Normally Empty,
-- but if expansion is active, and a parameter is one for which a
-- dynamic accessibility check is required, then an extra formal of type
-- Natural is created (see description of field Extra_Formal), and the
-- Extra_Accessibility field of the formal parameter points to the entity
-- for this extra formal. Also defined in variables when compiling
-- receiving stubs. In this case, a non Empty value means that this
-- variable's accessibility depth has been transmitted by the caller and
-- must be retrieved through the entity designed by this field instead of
-- being computed.
-- Extra_Accessibility_Of_Result
-- Defined in (non-generic) Function, Operator, and Subprogram_Type
-- entities. Normally Empty, but if expansion is active, and a function
-- is one for which "the accessibility level of the result ... determined
-- by the point of call" (AI05-0234) is needed, then an extra formal of
-- subtype Natural is created (see description of field Extra_Formal),
-- and the Extra_Accessibility_Of_Result field of the function points to
-- the entity for this extra formal.
-- Extra_Constrained
-- Defined in formal parameters in the non-generic case. Normally Empty,
-- but if expansion is active and a parameter is one for which a dynamic
-- indication of its constrained status is required, then an extra formal
-- of type Boolean is created (see description of field Extra_Formal),
-- and the Extra_Constrained field of the formal parameter points to the
-- entity for this extra formal. Also defined in variables when compiling
-- receiving stubs. In this case, a non empty value means that this
-- variable's constrained status has been transmitted by the caller and
-- must be retrieved through the entity designed by this field instead of
-- being computed.
-- Extra_Formal
-- Defined in formal parameters in the non-generic case. Certain
-- parameters require extra implicit information to be passed (e.g. the
-- flag indicating if an unconstrained variant record argument is
-- constrained, and the accessibility level for access parameters). See
-- description of Extra_Constrained, Extra_Accessibility fields for
-- further details. Extra formal parameters are constructed to represent
-- these values, and chained to the end of the list of formals using the
-- Extra_Formal field (i.e. the Extra_Formal field of the last "real"
-- formal points to the first extra formal, and the Extra_Formal field of
-- each extra formal points to the next one, with Empty indicating the
-- end of the list of extra formals). Another case of Extra_Formal arises
-- in connection with unnesting of subprograms, where the ARECnF formal
-- that represents an activation record pointer is an extra formal.
-- Extra_Formals
-- Applies to subprograms, subprogram types, entries, and entry
-- families. Returns first extra formal of the subprogram or entry.
-- Returns Empty if there are no extra formals.
-- Finalization_Master [root type only]
-- Defined in access-to-controlled or access-to-class-wide types. The
-- field contains the entity of the finalization master which handles
-- dynamically allocated controlled objects referenced by the access
-- type. Empty for access-to-subprogram types. Empty for access types
-- whose designated type does not need finalization actions.
-- Finalize_Storage_Only [base type only]
-- Defined in all types. Set on direct controlled types to which a
-- valid Finalize_Storage_Only pragma applies. This flag is also set on
-- composite types when they have at least one controlled component and
-- all their controlled components are Finalize_Storage_Only. It is also
-- inherited by type derivation except for direct controlled types where
-- the Finalize_Storage_Only pragma is required at each level of
-- derivation.
-- Finalizer
-- Applies to package declarations and bodies. Contains the entity of the
-- library-level program which finalizes all package-level controlled
-- objects.
-- First_Component (synthesized)
-- Applies to incomplete, private, protected, record and task types.
-- Returns the first component by following the chain of declared
-- entities for the type a component is found (one with an Ekind of
-- E_Component). The discriminants are skipped. If the record is null,
-- then Empty is returned.
-- First_Component_Or_Discriminant (synthesized)
-- Similar to First_Component, but discriminants are not skipped, so will
-- find the first discriminant if discriminants are present.
-- First_Entity
-- Defined in all entities which act as scopes to which a list of
-- associated entities is attached (blocks, class subtypes and types,
-- entries, functions, loops, packages, procedures, protected objects,
-- record types and subtypes, private types, task types and subtypes).
-- Points to a list of associated entities using the Next_Entity field
-- as a chain pointer with Empty marking the end of the list.
-- First_Exit_Statement
-- Defined in E_Loop entity. The exit statements for a loop are chained
-- (in reverse order of appearance) using this field to point to the
-- first entry in the chain (last exit statement in the loop). The
-- entries are chained through the Next_Exit_Statement field of the
-- N_Exit_Statement node with Empty marking the end of the list.
-- First_Formal (synthesized)
-- Applies to subprograms and subprogram types, and also to entries
-- and entry families. Returns first formal of the subprogram or entry.
-- The formals are the first entities declared in a subprogram or in
-- a subprogram type (the designated type of an Access_To_Subprogram
-- definition) or in an entry.
-- First_Formal_With_Extras (synthesized)
-- Applies to subprograms and subprogram types, and also in entries
-- and entry families. Returns first formal of the subprogram or entry.
-- Returns Empty if there are no formals. The list returned includes
-- all the extra formals (see description of Extra_Formals field).
-- First_Index
-- Defined in array types and subtypes. By introducing implicit subtypes
-- for the index constraints, we have the same structure for constrained
-- and unconstrained arrays, subtype marks and discrete ranges are
-- both represented by a subtype. This function returns the tree node
-- corresponding to an occurrence of the first index (NOT the entity for
-- the type). Subsequent indices are obtained using Next_Index. Note that
-- this field is defined for the case of string literal subtypes, but is
-- always Empty.
-- First_Literal
-- Defined in all enumeration types, including character and boolean
-- types. This field points to the first enumeration literal entity
-- for the type (i.e. it is set to First (Literals (N)) where N is
-- the enumeration type definition node. A special case occurs with
-- standard character and wide character types, where this field is
-- Empty, since there are no enumeration literal lists in these cases.
-- Note that this field is set in enumeration subtypes, but it still
-- points to the first literal of the base type in this case.
-- First_Private_Entity
-- Defined in all entities containing private parts (packages, protected
-- types and subtypes, task types and subtypes). The entities on the
-- entity chain are in order of declaration, so the entries for private
-- entities are at the end of the chain. This field points to the first
-- entity for the private part. It is Empty if there are no entities
-- declared in the private part or if there is no private part.
-- First_Rep_Item
-- Defined in all entities. If non-empty, points to a linked list of
-- representation pragmas nodes and representation clause nodes that
-- apply to the entity, linked using Next_Rep_Item, with Empty marking
-- the end of the list. In the case of derived types and subtypes, the
-- new entity inherits the chain at the point of declaration. This means
-- that it is possible to have multiple instances of the same kind of rep
-- item on the chain, in which case it is the first one that applies to
-- the entity.
--
-- Note: pragmas that can apply to more than one overloadable entity,
-- (Convention, Interface, Inline, Inline_Always, Import, Export,
-- External) are never present on this chain when they apply to
-- overloadable entities, since it is impossible for a given pragma
-- to be on more than one chain at a time.
--
-- For most representation items, the representation information is
-- reflected in other fields and flags in the entity. For example if a
-- record representation clause is present, the component entities
-- reflect the specified information. However, there are some items that
-- are only reflected in the chain. These include:
--
-- Machine_Attribute pragma
-- Link_Alias pragma
-- Linker_Constructor pragma
-- Linker_Destructor pragma
-- Weak_External pragma
-- Thread_Local_Storage pragma
--
-- If any of these items are present, then the flag Has_Gigi_Rep_Item is
-- set, indicating that the backend should search the chain.
--
-- Other representation items are included in the chain so that error
-- messages can easily locate the relevant nodes for posting errors.
-- Note in particular that size clauses are defined only for this
-- purpose, and should only be accessed if Has_Size_Clause is set.
-- Float_Rep [base type only]
-- Defined in floating-point entities. Contains a value of type
-- Float_Rep_Kind. Together with the Digits_Value uniquely defines
-- the floating-point representation to be used.
-- Freeze_Node
-- Defined in all entities. If there is an associated freeze node for the
-- entity, this field references this freeze node. If no freeze node is
-- associated with the entity, then this field is Empty. See package
-- Freeze for further details.
-- From_Limited_With
-- Defined in abtract states, package and type entities. Set to True when
-- the related entity is generated by the expansion of a limited with
-- clause. Such an entity is said to be a "shadow" - it acts as the
-- abstract view of a state or variable or as the incomplete view of a
-- type by inheriting relevant attributes from the said entity.
-- Full_View
-- Defined in all type and subtype entities and in deferred constants.
-- References the entity for the corresponding full type or constant
-- declaration. For all types other than private and incomplete types,
-- this field always contains Empty. If an incomplete type E1 is
-- completed by a private type E2 whose full type declaration entity is
-- E3 then the full view of E1 is E2, and the full view of E2 is E3. See
-- also Underlying_Type.
-- Generic_Homonym
-- Defined in generic packages. The generic homonym is the entity of
-- a renaming declaration inserted in every generic unit. It is used
-- to resolve the name of a local entity that is given by a qualified
-- name, when the generic entity itself is hidden by a local name.
-- Generic_Renamings
-- Defined in package and subprogram instances. Holds mapping that
-- associates generic parameters with the corresponding instances, in
-- those cases where the instance is an entity.
-- Handler_Records
-- Defined in subprogram and package entities. Points to a list of
-- identifiers referencing the handler record entities for the
-- corresponding unit.
-- Has_Aliased_Components [implementation base type only]
-- Defined in array type entities. Indicates that the component type
-- of the array is aliased. Should this also be set for records to
-- indicate that at least one component is aliased (see processing in
-- Sem_Prag.Process_Atomic_Independent_Shared_Volatile???)
-- Has_Alignment_Clause
-- Defined in all type entities and objects. Indicates if an alignment
-- clause has been given for the entity. If set, then Alignment_Clause
-- returns the N_Attribute_Definition node for the alignment attribute
-- definition clause. Note that it is possible for this flag to be False
-- even when Alignment_Clause returns non_Empty (this happens in the case
-- of derived type declarations).
-- Has_All_Calls_Remote
-- Defined in all library unit entities. Set if the library unit has an
-- All_Calls_Remote pragma. Note that such entities must also be RCI
-- entities, so the flag Is_Remote_Call_Interface will always be set if
-- this flag is set.
-- Has_Atomic_Components [implementation base type only]
-- Defined in all types and objects. Set only for an array type or
-- an array object if a valid pragma Atomic_Components applies to the
-- type or object. Note that in the case of an object, this flag is
-- only set on the object if there was an explicit pragma for the
-- object. In other words, the proper test for whether an object has
-- atomic components is to see if either the object or its base type
-- has this flag set. Note that in the case of a type, the pragma will
-- be chained to the rep item chain of the first subtype in the usual
-- manner.
-- Has_Attach_Handler (synthesized)
-- Applies to record types that are constructed by the expander to
-- represent protected types. Returns True if there is at least one
-- Attach_Handler pragma in the corresponding specification.
-- Has_Biased_Representation
-- Defined in discrete types (where it applies to the type'size value),
-- and to objects (both stand-alone and components), where it applies to
-- the size of the object from a size or record component clause. In
-- all cases it indicates that the size in question is smaller than
-- would normally be required, but that the size requirement can be
-- satisfied by using a biased representation, in which stored values
-- have the low bound (Expr_Value (Type_Low_Bound (T)) subtracted to
-- reduce the required size. For example, a type with a range of 1..2
-- takes one bit, using 0 to represent 1 and 1 to represent 2.
--
-- Note that in the object and component cases, the flag is only set if
-- the type is unbiased, but the object specifies a smaller size than the
-- size of the type, forcing biased representation for the object, but
-- the subtype is still an unbiased type.
-- Has_Completion
-- Defined in all entities that require a completion (functions,
-- procedures, private types, limited private types, incomplete types,
-- constants and packages that require a body). The flag is set if the
-- completion has been encountered and analyzed.
-- Has_Completion_In_Body
-- Defined in all entities for types and subtypes. Set only in "Taft
-- amendment types" (incomplete types whose full declaration appears in
-- the package body).
-- Has_Complex_Representation [implementation base type only]
-- Defined in record types. Set only for a base type to which a valid
-- pragma Complex_Representation applies.
-- Has_Component_Size_Clause [implementation base type only]
-- Defined in all type entities. Set if a component size clause is
-- Defined for the given type. Note that this flag can be False even
-- if Component_Size is non-zero (happens in the case of derived types).
-- Has_Constrained_Partial_View [base type only]
-- Defined in private type and their completions, when the private
-- type has no discriminants and the full view has discriminants with
-- defaults. In Ada 2005 heap-allocated objects of such types are not
-- constrained, and can change their discriminants with full assignment.
--
-- Ada 2012 has an additional rule (3.3. (23/10.3)) concerning objects
-- declared in a generic package body. Objects whose type is an untagged
-- generic formal private type are considered to have a constrained
-- partial view. The predicate Object_Type_Has_Constrained_Partial_View
-- in sem_aux is used to test for this case.
-- Has_Contiguous_Rep
-- Defined in enumeration types. Set if the type has a representation
-- clause whose entries are successive integers.
-- Has_Controlled_Component [base type only]
-- Defined in all type and subtype entities. Set only for composite type
-- entities which contain a component that either is a controlled type,
-- or itself contains controlled component (i.e. either Is_Controlled or
-- Has_Controlled_Component is set for at least one component).
-- Has_Controlling_Result
-- Defined in E_Function entities. Set if the function is a primitive
-- function of a tagged type which can dispatch on result.
-- Has_Convention_Pragma
-- Defined in all entities. Set for an entity for which a valid pragma
-- Convention, Import, or Export has been given. Used to prevent more
-- than one such pragma appearing for a given entity (RM B.1(45)).
-- Has_Default_Aspect [base type only]
-- Defined in entities for types and subtypes, set for scalar types with
-- a Default_Value aspect and array types with a Default_Component_Value
-- aspect. If this flag is set, then a corresponding aspect specification
-- node will be present on the rep item chain for the entity. For a
-- derived type that inherits a default from its ancestor, the default
-- value is set, but it may be overridden by an aspect declaration on
-- 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.
-- Has_Delayed_Freeze
-- Defined in all entities. Set to indicate that an explicit freeze
-- node must be generated for the entity at its freezing point. See
-- separate section ("Delayed Freezing and Elaboration") for details.
-- Has_Delayed_Rep_Aspects
-- Defined in all types and subtypes. This flag is set if there is at
-- least one aspect for a representation characteristic that has to be
-- delayed and is one of the characteristics that may be inherited by
-- types derived from this type if not overridden. If this flag is set,
-- then types derived from this type have May_Inherit_Delayed_Rep_Aspects
-- set, signalling that Freeze.Inherit_Delayed_Rep_Aspects must be called
-- at the freeze point of the derived type.
-- Has_DIC (synthesized)
-- Defined in all type entities. Set for a private type and its full view
-- when the type is subject to pragma Default_Initial_Condition (DIC), or
-- when the type inherits a DIC pragma from a parent type.
-- Has_Discriminants
-- Defined in all types and subtypes. For types that are allowed to have
-- discriminants (record types and subtypes, task types and subtypes,
-- protected types and subtypes, private types, limited private types,
-- and incomplete types), indicates if the corresponding type or subtype
-- has a known discriminant part. Always false for all other types.
-- Has_Dispatch_Table
-- Defined in E_Record_Types that are tagged. Set to indicate that the
-- corresponding dispatch table is already built. This flag is used to
-- avoid duplicate construction of library level dispatch tables (because
-- the declaration of library level objects cause premature construction
-- of the table); otherwise the code that builds the table is added at
-- the end of the list of declarations of the package.
-- Has_Dynamic_Predicate_Aspect
-- Defined in all types and subtypes. Set if a Dynamic_Predicate aspect
-- was explicitly applied to the type. Generally we treat predicates as
-- static if possible, regardless of whether they are specified using
-- Predicate, Static_Predicate, or Dynamic_Predicate. And if a predicate
-- can be treated as static (i.e. its expression is predicate-static),
-- then the flag Has_Static_Predicate will be set True. But there are
-- cases where legality is affected by the presence of an explicit
-- Dynamic_Predicate aspect. For example, even if a predicate looks
-- static, you can't use it in a case statement if there is an explicit
-- Dynamic_Predicate aspect specified. So test Has_Static_Predicate if
-- you just want to know if the predicate can be evaluated statically,
-- but test Has_Dynamic_Predicate_Aspect to enforce legality rules about
-- the use of dynamic predicates.
-- Has_Entries (synthesized)
-- Applies to concurrent types. True if any entries are declared
-- within the task or protected definition for the type.
-- Has_Enumeration_Rep_Clause
-- Defined in enumeration types. Set if an enumeration representation
-- clause has been given for this enumeration type. Used to prevent more
-- than one enumeration representation clause for a given type. Note
-- that this does not imply a representation with holes, since the rep
-- clause may merely confirm the default 0..N representation.
-- Has_Exit
-- Defined in loop entities. Set if the loop contains an exit statement.
-- Has_Expanded_Contract
-- Defined in functions, procedures, entries, and entry families. Set
-- when a subprogram has a N_Contract node that has been expanded. The
-- flag prevents double expansion of a contract when a construct is
-- rewritten into something else and subsequently reanalyzed/expanded.
-- Has_Foreign_Convention (synthesized)
-- Applies to all entities. Determines if the Convention for the entity
-- is a foreign convention, i.e. non-native: other than Convention_Ada,
-- Convention_Intrinsic, Convention_Entry, Convention_Protected,
-- Convention_Stubbed and Convention_Ada_Pass_By_(Copy,Reference).
-- Has_Forward_Instantiation
-- Defined in package entities. Set for packages that instantiate local
-- generic entities before the corresponding generic body has been seen.
-- If a package has a forward instantiation, we cannot inline subprograms
-- appearing in the same package because the placement requirements of
-- the instance will conflict with the linear elaboration of front-end
-- inlining.
-- Has_Fully_Qualified_Name
-- Defined in all entities. Set if the name in the Chars field has been
-- replaced by the fully qualified name, as used for debug output. See
-- Exp_Dbug for a full description of the use of this flag and also the
-- related flag Has_Qualified_Name.
-- Has_Gigi_Rep_Item
-- Defined in all entities. Set if the rep item chain (referenced by
-- First_Rep_Item and linked through the Next_Rep_Item chain) contains a
-- representation item that needs to be specially processed by the back
-- end, i.e. one of the following items:
--
-- Machine_Attribute pragma
-- Linker_Alias pragma
-- Linker_Constructor pragma
-- Linker_Destructor pragma
-- Weak_External pragma
-- Thread_Local_Storage pragma
--
-- If this flag is set, then the backend should scan the rep item chain
-- to process any of these items that appear. At least one such item will
-- be present.
--
-- Has_Homonym
-- Defined in all entities. Set if an entity has a homonym in the same
-- scope. Used by the backend to generate unique names for all entities.
-- Has_Implicit_Dereference
-- Defined in types and discriminants. Set if the type has an aspect
-- Implicit_Dereference. Set also on the discriminant named in the aspect
-- clause, to simplify type resolution.
-- Has_Independent_Components [implementation base type only]
-- Defined in all types and objects. Set only for a record type or an
-- array type or array object if a valid pragma Independent_Components
-- applies to the type or object. Note that in the case of an object,
-- this flag is only set on the object if there was an explicit pragma
-- for the object. In other words, the proper test for whether an object
-- has independent components is to see if either the object or its base
-- type has this flag set. Note that in the case of a type, the pragma
-- will be chained to the rep item chain of the first subtype in the
-- usual manner. Also set if a pragma Has_Atomic_Components or pragma
-- Has_Aliased_Components applies to the type or object.
-- Has_Inheritable_Invariants [base type only]
-- Defined in all type entities. Set on private types and interface types
-- which define at least one class-wide invariant. Such invariants must
-- be inherited by derived types. The flag is also set on the full view
-- of a private type for completeness.
-- Has_Inherited_DIC [base type only]
-- Defined in all type entities. Set for a derived type which inherits
-- pragma Default_Initial_Condition from a parent type.
-- Has_Inherited_Invariants [base type only]
-- Defined in all type entities. Set on private extensions and derived
-- types which inherit at least one class-wide invariant from a parent or
-- an interface type. The flag is also set on the full view of a private
-- extension for completeness.
-- Has_Initial_Value
-- Defined in entities for variables and out parameters. Set if there
-- is an explicit initial value expression in the declaration of the
-- variable. Note that this is set only if this initial value is
-- explicit, it is not set for the case of implicit initialization
-- of access types or controlled types. Always set to False for out
-- parameters. Also defined in entities for in and in-out parameters,
-- but always false in these cases.
-- Has_Interrupt_Handler (synthesized)
-- Applies to all protected type entities. Set if the protected type
-- definition contains at least one procedure to which a pragma
-- Interrupt_Handler applies.
-- Has_Invariants (synthesized)
-- Defined in all type entities. True if the type defines at least one
-- invariant of its own or inherits at least one class-wide invariant
-- from a parent type or an interface.
-- Has_Limited_View (synth)
-- Defined in all entities. True for non-generic package entities that
-- are non-instances and their Limited_View attribute is present.
-- Has_Loop_Entry_Attributes
-- Defined in E_Loop entities. Set when the loop is subject to at least
-- one attribute 'Loop_Entry. The flag also implies that the loop has
-- already been transformed. See Expand_Loop_Entry_Attribute for details.
-- Has_Machine_Radix_Clause
-- Defined in decimal types and subtypes, set if a Machine_Radix
-- representation clause is present. This flag is used to detect
-- the error of multiple machine radix clauses for a single type.
-- Has_Master_Entity
-- Defined in entities that can appear in the scope stack (see spec
-- of Sem). It is set if a task master entity (_master) has been
-- declared and initialized in the corresponding scope.
-- Has_Missing_Return
-- Defined in functions and generic functions. Set if there is one or
-- more missing return statements in the function. This is used to
-- control wrapping of the body in Exp_Ch6 to ensure that the program
-- error exception is correctly raised in this case at run time.
-- Has_Nested_Block_With_Handler
-- Defined in scope entities. Set if there is a nested block within the
-- scope that has an exception handler and the two scopes are in the
-- same procedure. This is used by the backend for controlling certain
-- optimizations to ensure that they are consistent with exceptions.
-- See documentation in backend for further details.
-- Has_Nested_Subprogram
-- Defined in subprogram entities. Set for a subprogram which contains at
-- least one nested subprogram.
-- Has_Non_Limited_View (synth)
-- Defined in E_Incomplete_Type, E_Incomplete_Subtype, E_Class_Wide_Type,
-- E_Abstract_State entities. True if their Non_Limited_View attribute
-- is present.
-- Has_Non_Null_Abstract_State (synth)
-- Defined in package entities. True if the package is subject to a non-
-- null Abstract_State aspect/pragma.
-- Has_Non_Null_Visible_Refinement (synth)
-- Defined in E_Abstract_State entities. True if the state has a visible
-- refinement of at least one variable or state constituent as expressed
-- in aspect/pragma Refined_State.
-- Has_Non_Standard_Rep [implementation base type only]
-- Defined in all type entities. Set when some representation clause
-- or pragma causes the representation of the item to be significantly
-- modified. In this category are changes of small or radix for a
-- fixed-point type, change of component size for an array, and record
-- or enumeration representation clauses, as well as packed pragmas.
-- All other representation clauses (e.g. Size and Alignment clauses)
-- are not considered to be significant since they do not affect
-- stored bit patterns.
-- Has_Null_Abstract_State (synth)
-- Defined in package entities. True if the package is subject to a null
-- Abstract_State aspect/pragma.
-- Has_Null_Visible_Refinement (synth)
-- Defined in E_Abstract_State entities. True if the state has a visible
-- null refinement as expressed in aspect/pragma Refined_State.
-- Has_Object_Size_Clause
-- Defined in entities for types and subtypes. Set if an Object_Size
-- clause has been processed for the type. Used to prevent multiple
-- Object_Size clauses for a given entity.
-- Has_Out_Or_In_Out_Parameter
-- Present in subprograms, generic subprograms, entries, and entry
-- families. Set if they have at least one OUT or IN OUT parameter
-- (allowed for functions only in Ada 2012).
-- Has_Own_DIC [base type only]
-- Defined in all type entities. Set for a private type and its full view
-- (and its underlying full view, if the full view is itself private)
-- when the type is subject to pragma Default_Initial_Condition.
-- Has_Own_Invariants [base type only]
-- Defined in all type entities. Set on any type that defines at least
-- one invariant of its own.
-- Note: this flag is set on both partial and full view of types to which
-- an Invariant pragma or aspect applies, and on the underlying full view
-- if the full view is private.
-- Has_Partial_Visible_Refinement
-- Defined in E_Abstract_State entities. Set when a state has at least
-- one refinement constituent subject to indicator Part_Of, and analysis
-- is in the region between the declaration of the first constituent for
-- this abstract state (in the private part of the package) and the end
-- of the package spec or body with visibility over this private part
-- (which includes the package itself and its child packages).
-- Has_Per_Object_Constraint
-- Defined in E_Component entities. Set if the subtype of the component
-- has a per object constraint. Per object constraints result from the
-- following situations :
--
-- 1. N_Attribute_Reference - when the prefix is the enclosing type and
-- the attribute is Access.
-- 2. N_Discriminant_Association - when the expression uses the
-- discriminant of the enclosing type.
-- 3. N_Index_Or_Discriminant_Constraint - when at least one of the
-- individual constraints is a per object constraint.
-- 4. N_Range - when the lower or upper bound uses the discriminant of
-- the enclosing type.
-- 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.
-- Has_Pragma_Inline
-- Defined in all entities. Set for functions and procedures for which a
-- pragma Inline or Inline_Always applies to the subprogram. Note that
-- this flag can be set even if Is_Inlined is not set. This happens for
-- pragma Inline (if Inline_Active is False). In other words, the flag
-- Has_Pragma_Inline represents the formal semantic status, and is used
-- for checking semantic correctness. The flag Is_Inlined indicates
-- whether inlining is actually active for the entity.
-- Has_Pragma_Inline_Always
-- Defined in all entities. Set for functions and procedures for which a
-- pragma Inline_Always applies. Note that if this flag is set, the flag
-- Has_Pragma_Inline is also set.
-- Has_Pragma_No_Inline
-- Defined in all entities. Set for functions and procedures for which a
-- pragma No_Inline applies. Note that if this flag is set, the flag
-- Has_Pragma_Inline_Always cannot be set.
-- Has_Pragma_Ordered [implementation base type only]
-- Defined in entities for enumeration types. If set indicates that a
-- valid pragma Ordered was given for the type. This flag is inherited
-- by derived enumeration types. We don't need to distinguish the derived
-- case since we allow multiple occurrences of this pragma anyway.
-- Has_Pragma_Pack [implementation base type only]
-- Defined in array and record type entities. If set, indicates that a
-- valid pragma Pack was given for the type. Note that this flag is not
-- inherited by derived type. See also the Is_Packed flag.
-- Has_Pragma_Preelab_Init
-- Defined in type and subtype entities. If set indicates that a valid
-- pragma Preelaborable_Initialization applies to the type.
-- Has_Pragma_Pure
-- Defined in all entities. If set, indicates that a valid pragma Pure
-- was given for the entity. In some cases, we need to test whether
-- Is_Pure was explicitly set using this pragma.
-- Has_Pragma_Pure_Function
-- Defined in all entities. If set, indicates that a valid pragma
-- Pure_Function was given for the entity. In some cases, we need to test
-- whether Is_Pure was explicitly set using this pragma. We also set
-- this flag for some internal entities that we know should be treated
-- as pure for optimization purposes.
-- Has_Pragma_Thread_Local_Storage
-- Defined in all entities. If set, indicates that a valid pragma
-- Thread_Local_Storage was given for the entity.
-- Has_Pragma_Unmodified
-- Defined in all entities. Can only be set for variables (E_Variable,
-- E_Out_Parameter, E_In_Out_Parameter). Set if a valid pragma Unmodified
-- applies to the variable, indicating that no warning should be given
-- if the entity is never modified. Note that clients should generally
-- not test this flag directly, but instead use function Has_Unmodified.
-- Has_Pragma_Unreferenced
-- Defined in all entities. Set if a valid pragma Unreferenced applies
-- to the entity, indicating that no warning should be given if the
-- entity has no references, but a warning should be given if it is
-- in fact referenced. For private types, this flag is set in both the
-- private entity and full entity if the pragma applies to either. Note
-- that clients should generally not test this flag directly, but instead
-- use function Has_Unreferenced.
-- Has_Pragma_Unreferenced_Objects
-- Defined in all entities. Set if a valid pragma Unused applies to an
-- entity, indicating that warnings should be given if the entity is
-- modified or referenced. This pragma is equivalent to a pair of
-- Unmodified and Unreferenced pragmas.
-- Has_Pragma_Unused
-- Defined in all entities. Set if a valid pragma Unused applies to a
-- variable or entity, indicating that warnings should not be given if
-- it is never modified or referenced. Note: This pragma is exactly
-- equivalent Unmodified and Unreference combined.
-- Has_Predicates
-- Defined in type and subtype entities. Set if a pragma Predicate or
-- Predicate aspect applies to the type or subtype, or if it inherits a
-- Predicate aspect from its parent or progenitor types.
--
-- Note: this flag is set on both partial and full view of types to which
-- a Predicate pragma or aspect applies, and on the underlying full view
-- if the full view is private.
-- Has_Primitive_Operations [base type only]
-- Defined in all type entities. Set if at least one primitive operation
-- is defined for the type.
-- Has_Private_Ancestor
-- Applies to type extensions. True if some ancestor is derived from a
-- private type, making some components invisible and aggregates illegal.
-- This flag is set at the point of derivation. The legality of the
-- aggregate must be rechecked because it also depends on the visibility
-- at the point the aggregate is resolved. See sem_aggr.adb. This is part
-- of AI05-0115.
-- Has_Private_Declaration
-- Defined in all entities. Set if it is the defining entity of a private
-- type declaration or its corresponding full declaration. This flag is
-- thus preserved when the full and the partial views are exchanged, to
-- indicate if a full type declaration is a completion. Used for semantic
-- checks in E.4(18) and elsewhere.
-- Has_Private_Extension
-- Defined in tagged types. Set to indicate that the tagged type has some
-- private extension. Used to report a warning on public primitives added
-- after defining its private extensions.
-- Has_Protected [base type only]
-- Defined in all type entities. Set on protected types themselves, and
-- also (recursively) on any composite type which has a component for
-- which Has_Protected is set, unless the protected type is declared in
-- the private part of an internal unit. The meaning is that restrictions
-- for protected types apply to this type. Note: the flag is not set on
-- access types, even if they designate an object that Has_Protected.
-- Has_Qualified_Name
-- Defined in all entities. Set if the name in the Chars field has
-- been replaced by its qualified name, as used for debug output. See
-- Exp_Dbug for a full description of qualification requirements. For
-- some entities, the name is the fully qualified name, but there are
-- exceptions. In particular, for local variables in procedures, we
-- do not include the procedure itself or higher scopes. See also the
-- flag Has_Fully_Qualified_Name, which is set if the name does indeed
-- include the fully qualified name.
-- Has_RACW
-- Defined in package spec entities. Set if the spec contains the
-- declaration of a remote access-to-classwide type.
-- Has_Record_Rep_Clause [implementation base type only]
-- Defined in record types. Set if a record representation clause has
-- been given for this record type. Used to prevent more than one such
-- clause for a given record type. Note that this is initially cleared
-- for a derived type, even though the representation is inherited. See
-- also the flag Has_Specified_Layout.
-- Has_Recursive_Call
-- Defined in procedures. Set if a direct parameterless recursive call
-- is detected while analyzing the body. Used to activate some error
-- checks for infinite recursion.
-- Has_Shift_Operator [base type only]
-- Defined in integer types. Set in the base type of an integer type for
-- which at least one of the shift operators is defined.
-- Has_Size_Clause
-- Defined in entities for types and objects. Set if a size or value size
-- clause is defined for the entity. Used to prevent multiple clauses
-- for a given entity. Note that it is always initially cleared for a
-- derived type, even though the Size or Value_Size clause for such a
-- type might be inherited from an ancestor type.
-- Has_Small_Clause
-- Defined in ordinary fixed point types (but not subtypes). Indicates
-- that a small clause has been given for the entity. Used to prevent
-- multiple Small clauses for a given entity. Note that it is always
-- initially cleared for a derived type, even though the Small for such
-- a type is inherited from a Small clause given for the parent type.
-- Has_Specified_Layout [implementation base type only]
-- Defined in all type entities. Set for a record type or subtype if
-- the record layout has been specified by a record representation
-- clause. Note that this differs from the flag Has_Record_Rep_Clause
-- in that it is inherited by a derived type. Has_Record_Rep_Clause is
-- used to indicate that the type is mentioned explicitly in a record
-- representation clause, and thus is not inherited by a derived type.
-- This flag is always False for non-record types.
-- Has_Specified_Stream_Input
-- Has_Specified_Stream_Output
-- Has_Specified_Stream_Read
-- Has_Specified_Stream_Write
-- Defined in all type and subtype entities. Set for a given view if the
-- corresponding stream-oriented attribute has been defined by an
-- attribute definition clause. When such a clause occurs, a TSS is set
-- on the underlying full view; the flags are used to track visibility of
-- the attribute definition clause for partial or incomplete views.
-- Has_Static_Discriminants
-- Defined in record subtypes constrained by discriminant values. Set if
-- all the discriminant values have static values, meaning that in the
-- case of a variant record, the component list can be trimmed down to
-- include only the components corresponding to these discriminants.
-- Has_Static_Predicate
-- Defined in all types and subtypes. Set if the type (which must be a
-- scalar type) has a predicate whose expression is predicate-static.
-- This can result from the use of any Predicate, Static_Predicate, or
-- Dynamic_Predicate aspect. We can distinguish these cases by testing
-- Has_Static_Predicate_Aspect and Has_Dynamic_Predicate_Aspect. See
-- description of the latter flag for further information on dynamic
-- predicates which are also static.
-- Has_Static_Predicate_Aspect
-- Defined in all types and subtypes. Set if a Static_Predicate aspect
-- applies to the type. Note that we can tell if a static predicate is
-- present by looking at Has_Static_Predicate, but this could have come
-- from a Predicate aspect or pragma or even from a Dynamic_Predicate
-- aspect. When we need to know the difference (e.g. to know what set of
-- check policies apply, use this flag and Has_Dynamic_Predicate_Aspect
-- to determine which case we have).
-- Has_Storage_Size_Clause [implementation base type only]
-- Defined in task types and access types. It is set if a Storage_Size
-- clause is present for the type. Used to prevent multiple clauses for
-- one type. Note that this flag is initially cleared for a derived type
-- even though the Storage_Size for such a type is inherited from a
-- Storage_Size clause given for the parent type. Note that in the case
-- of access types, this flag is defined only in the root type, since a
-- storage size clause cannot be given to a derived type.
-- Has_Stream_Size_Clause
-- Defined in all entities. It is set for types which have a Stream_Size
-- clause attribute. Used to prevent multiple Stream_Size clauses for a
-- given entity, and also whether it is necessary to check for a stream
-- size clause.
-- Has_Task [base type only]
-- Defined in all type entities. Set on task types themselves, and also
-- (recursively) on any composite type which has a component for which
-- Has_Task is set. The meaning is that an allocator or declaration of
-- such an object must create the required tasks. Note: the flag is not
-- set on access types, even if they designate an object that Has_Task.
-- Has_Timing_Event [base type only]
-- Defined in all type entities. Set on language defined type
-- Ada.Real_Time.Timing_Events.Timing_Event, and also (recursively) on
-- any composite type which has a component for which Has_Timing_Event
-- is set. Used for the No_Local_Timing_Event restriction.
-- Has_Thunks
-- Applies to E_Constant entities marked Is_Tag. True for secondary tag
-- referencing a dispatch table whose contents are pointers to thunks.
-- Has_Unchecked_Union [base type only]
-- Defined in all type entities. Set on unchecked unions themselves
-- and (recursively) on any composite type which has a component for
-- which Has_Unchecked_Union is set. The meaning is that a comparison
-- operation or 'Valid_Scalars reference for the type is not permitted.
-- Note that the flag is not set on access types, even if they designate
-- an object that has the flag Has_Unchecked_Union set.
-- Has_Unknown_Discriminants
-- Defined in all entities. Set for types with unknown discriminants.
-- Types can have unknown discriminants either from their declaration or
-- through type derivation. The use of this flag exactly meets the spec
-- in RM 3.7(26). Note that all class-wide types are considered to have
-- unknown discriminants. Note that both flags Has_Discriminants and
-- Has_Unknown_Discriminants may be true for a type. Class-wide types and
-- their subtypes have unknown discriminants and can have declared ones
-- as well. Private types declared with unknown discriminants may have a
-- full view that has explicit discriminants, and both flag will be set
-- on the partial view, to ensure that discriminants are properly
-- inherited in certain contexts.
-- Has_Visible_Refinement
-- Defined in E_Abstract_State entities. Set when a state has at least
-- one refinement constituent and analysis is in the region between
-- pragma Refined_State and the end of the package body declarations.
-- Has_Volatile_Components [implementation base type only]
-- Defined in all types and objects. Set only for an array type or array
-- object if a valid pragma Volatile_Components or a valid pragma
-- Atomic_Components applies to the type or object. Note that in the case
-- of an object, this flag is only set on the object if there was an
-- explicit pragma for the object. In other words, the proper test for
-- whether an object has volatile components is to see if either the
-- object or its base type has this flag set. Note that in the case of a
-- type the pragma will be chained to the rep item chain of the first
-- subtype in the usual manner.
-- Has_Xref_Entry
-- Defined in all entities. Set if an entity has an entry in the Xref
-- information generated in ali files. This is true for all source
-- entities in the extended main source file. It is also true of entities
-- in other packages that are referenced directly or indirectly from the
-- main source file (indirect reference occurs when the main source file
-- references an entity with a type reference. See package Lib.Xref for
-- further details).
-- Has_Yield_Aspect
-- Defined in subprograms, generic subprograms, entries, entry families.
-- Set if the entity has aspect Yield.
-- Hiding_Loop_Variable
-- Defined in variables. Set only if a variable of a discrete type is
-- hidden by a loop variable in the same local scope, in which case
-- the Hiding_Loop_Variable field of the hidden variable points to
-- the E_Loop_Parameter entity doing the hiding. Used in processing
-- warning messages if the hidden variable turns out to be unused
-- or is referenced without being set.
-- Hidden_In_Formal_Instance
-- Defined on actuals for formal packages. Entities on the list are
-- formals that are hidden outside of the formal package when this
-- package is not declared with a box, or the formal itself is not
-- defaulted (see RM 12.7 (10)). Their visibility is restored on exit
-- from the current generic, because the actual for the formal package
-- may be used subsequently in the current unit.
-- Homonym
-- Defined in all entities. Link for list of entities that have the
-- same source name and that are declared in the same or enclosing
-- scopes. Homonyms in the same scope are overloaded. Used for name
-- resolution and for the generation of debugging information.
-- Ignore_SPARK_Mode_Pragmas
-- Present in concurrent type, entry, operator, [generic] package,
-- package body, [generic] subprogram, and subprogram body entities.
-- Set when the entity appears in an instance subject to SPARK_Mode
-- "off" and indicates that all SPARK_Mode pragmas found within must
-- be ignored.
-- Ignored_Class_Postconditions
-- Defined on subprogram entities. Set if the subprogram has class-wide
-- postconditions. Denotes the (and-then) expression built by merging
-- inherited ignored class-wide postconditions with its own ignored
-- class-wide postconditions.
-- Ignored_Class_Preconditions
-- Defined on subprogram entities. Set if the subprogram has class-wide
-- preconditions. Denotes the (or-else) expression built by merging
-- inherited ignored class-wide preconditions with its own ignored
-- class-wide preconditions.
-- Implementation_Base_Type (synthesized)
-- Applies to all entities. For types, similar to Base_Type, but never
-- returns a private type when applied to a non-private type. Instead in
-- this case, it always returns the Underlying_Type of the base type, so
-- that we still have a concrete type. For entities other than types,
-- returns the entity unchanged.
-- Import_Pragma
-- Defined in subprogram entities. Set if a valid pragma Import or pragma
-- Import_Function or pragma Import_Procedure applies to the subprogram,
-- in which case this field points to the pragma (we can't use the normal
-- Rep_Item chain mechanism, because a single pragma Import can apply
-- to multiple subprogram entities).
-- In_Package_Body
-- Defined in package entities. Set on the entity that denotes the
-- package (the defining occurrence of the package declaration) while
-- analyzing and expanding the package body. Reset on completion of
-- analysis/expansion.
-- In_Private_Part
-- Defined in all entities. Can be set only in package entities and
-- objects. For package entities, this flag is set to indicate that the
-- private part of the package is being analyzed. The flag is reset at
-- the end of the package declaration. For objects it indicates that the
-- declaration of the object occurs in the private part of a package.
-- Incomplete_Actuals
-- Defined on package entities that are instances. Indicates the actuals
-- types in the instantiation that are limited views. If this list is
-- not empty, the instantiation, which appears in a package declaration,
-- is relocated to the corresponding package body, which must have a
-- corresponding nonlimited with_clause.
-- Indirect_Call_Wrapper
-- Defined on subprogram entities. Set if the subprogram has class-wide
-- preconditions. Denotes the internal wrapper that checks preconditions
-- and invokes the subprogram body. Subp'Access points to the indirect
-- call wrapper if available.
-- Initialization_Statements
-- Defined in constants and variables. For a composite object initialized
-- with an aggregate that has been converted to a sequence of
-- assignments, points to a compound statement containing the
-- assignments.
-- Inner_Instances
-- Defined in generic units. Contains element list of units that are
-- instantiated within the given generic. Used to diagnose circular
-- instantiations.
-- Interface_Alias
-- Defined in subprograms that cover a primitive operation of an abstract
-- interface type. Can be set only if the Is_Hidden flag is also set,
-- since such entities are always hidden. Points to its associated
-- interface subprogram. It is used to register the subprogram in
-- secondary dispatch table of the interface (Ada 2005: AI-251).
-- Interface_Name
-- Defined in constants, variables, exceptions, functions, procedures,
-- and packages. Set to Empty unless an export, import, or interface name
-- pragma has explicitly specified an external name, in which case it
-- references an N_String_Literal node for the specified external name.
-- Note that if this field is Empty, and Is_Imported or Is_Exported is
-- set, then the default interface name is the name of the entity, cased
-- in a manner that is appropriate to the system in use. Note that
-- Interface_Name is ignored if an address clause is present (since it
-- is meaningless in this case).
-- Interfaces
-- Defined in record types and subtypes. List of abstract interfaces
-- implemented by a tagged type that are not already implemented by the
-- ancestors (Ada 2005: AI-251).
-- Invariant_Procedure (synthesized)
-- Defined in types and subtypes. Set for private types and their full
-- views if one or more [class-wide] invariants apply to the type, or
-- when the type inherits class-wide invariants from a parent type or
-- an interface, or when the type is an array and its component type is
-- subject to an invariant, or when the type is record and contains a
-- component subject to an invariant (property is recursive). Points to
-- to the entity for a procedure which checks all these invariants. The
-- invariant procedure takes a single argument of the given type, and
-- returns if the invariant holds, or raises exception Assertion_Error
-- with an appropriate message if it does not hold. This attribute is
-- defined but always Empty for private subtypes.
-- Note: the reason this is marked as a synthesized attribute is that the
-- way this is stored is as an element of the Subprograms_For_Type field.
-- In_Use
-- Defined in packages and types. Set when analyzing a use clause for
-- the corresponding entity. Reset at end of corresponding declarative
-- part. The flag on a type is also used to determine the visibility of
-- the primitive operators of the type.
-- Is_Abstract_Subprogram
-- Defined in all subprograms and entries. Set for abstract subprograms.
-- Always False for enumeration literals and entries. See also
-- Requires_Overriding.
-- Is_Abstract_Type
-- Defined in all types. Set for abstract types.
-- Is_Access_Constant
-- Defined in access types and subtypes. Indicates that the keyword
-- constant was present in the access type definition.
-- Is_Access_Protected_Subprogram_Type (synthesized)
-- Applies to all types, true for named and anonymous access to
-- protected subprograms.
-- Is_Access_Type (synthesized)
-- Applies to all entities, true for access types and subtypes
-- Is_Access_Object_Type (synthesized)
-- Applies to all entities, true for access-to-object types and subtypes
-- 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.
-- Is_Actual_Subtype
-- Defined on all types, true for the generated constrained subtypes
-- that are built for unconstrained composite actuals.
-- Is_Ada_2005_Only
-- Defined in all entities, true if a valid pragma Ada_05 or Ada_2005
-- applies to the entity which specifically names the entity, indicating
-- that the entity is Ada 2005 only. Note that this flag is not set if
-- the entity is part of a unit compiled with the normal no-argument form
-- of pragma Ada_05 or Ada_2005.
-- Is_Ada_2012_Only
-- Defined in all entities, true if a valid pragma Ada_12 or Ada_2012
-- applies to the entity which specifically names the entity, indicating
-- that the entity is Ada 2012 only. Note that this flag is not set if
-- the entity is part of a unit compiled with the normal no-argument form
-- of pragma Ada_12 or Ada_2012.
-- Is_Ada_2022_Only
-- Defined in all entities, true if a valid pragma Ada_2022 applies to
-- the entity which specifically names the entity, indicating that the
-- entity is Ada 2022 only. Note that this flag is not set if the entity
-- is part of a unit compiled with the normal no-argument form of pragma
-- Ada_2022.
-- Is_Aliased
-- Defined in all entities. Set for objects and types whose declarations
-- carry the keyword aliased, and on record components that have the
-- keyword. For Ada 2012, also applies to formal parameters.
-- Is_Array_Type (synthesized)
-- Applies to all entities, true for array types and subtypes
-- Is_Asynchronous
-- Defined in all type entities and in procedure entities. Set
-- if a pragma Asynchronous applies to the entity.
-- Is_Atomic
-- Defined in all type entities, and also in constants, components, and
-- variables. Set if a pragma Atomic or Shared applies to the entity.
-- In the case of private and incomplete types, this flag is set in
-- both the partial view and the full view.
-- Is_Full_Access (synth)
-- Defined in all type entities, and also in constants, components and
-- variables. Set if an aspect/pragma Atomic/Shared, or an aspect/pragma
-- Volatile_Full_Access or an Ada 2022 aspect Full_Access_Only applies
-- to the entity. In the case of private and incomplete types, the flag
-- applies to both the partial view and the full view.
-- Is_Base_Type (synthesized)
-- Applies to type and subtype entities. True if entity is a base type.
-- Is_Bit_Packed_Array [implementation base type only]
-- Defined in all entities. This flag is set for a packed array type that
-- is bit-packed (i.e. the component size is known by the front end and
-- is in the range 1-63 but not a multiple of 8). Is_Packed is always set
-- if Is_Bit_Packed_Array is set, but it is possible for Is_Packed to be
-- set without Is_Bit_Packed_Array if the component size is not known by
-- the front-end or for the case of an array having one or more index
-- types that are enumeration types with non-standard representation.
-- Is_Boolean_Type (synthesized)
-- Applies to all entities, true for boolean types and subtypes,
-- i.e. Standard.Boolean and all types ultimately derived from it.
-- Is_Called
-- Defined in subprograms and packages. Set if a subprogram is called
-- from the unit being compiled or a unit in the closure. Also set for
-- a package that contains called subprograms. Used only for inlining.
-- Is_Character_Type
-- Defined in all entities. Set for character types and subtypes,
-- i.e. enumeration types that have at least one character literal.
-- Is_Checked_Ghost_Entity
-- Applies to all entities. Set for abstract states, [generic] packages,
-- [generic] subprograms, components, discriminants, formal parameters,
-- objects, package bodies, subprogram bodies, and [sub]types subject to
-- pragma Ghost or inherit "ghostness" from an enclosing construct, and
-- subject to Assertion_Policy Ghost => Check.
-- Is_Child_Unit
-- Defined in all entities. Set only for defining entities of program
-- units that are child units (but False for subunits).
-- Is_Class_Wide_Equivalent_Type
-- Defined in record types and subtypes. Set to True, if the type acts
-- as a class-wide equivalent type, i.e. the Equivalent_Type field of
-- some class-wide subtype entity references this record type.
-- Is_Class_Wide_Type (synthesized)
-- Applies to all entities, true for class wide types and subtypes
-- Is_Class_Wide_Wrapper
-- Defined in subprogram entities. Indicates that it has been created as
-- a wrapper in a generic/instance scenario involving a formal type and
-- a generic primitive operation when the actual is a class-wide type.
-- Is_Compilation_Unit
-- Defined in all entities. Set if the entity is a package or subprogram
-- entity for a compilation unit other than a subunit (since we treat
-- subunits as part of the same compilation operation as the ultimate
-- parent, we do not consider them to be separate units for this flag).
-- Is_Completely_Hidden
-- Defined on discriminants. Only set on stored discriminants of
-- untagged types. When set, the entity is a stored discriminant of a
-- derived untagged type which is not directly visible in the derived
-- type because the derived type or one of its ancestors have renamed the
-- discriminants in the root type. Note: there are stored discriminants
-- which are not Completely_Hidden (e.g. discriminants of a root type).
-- Is_Composite_Type (synthesized)
-- Applies to all entities, true for all composite types and subtypes.
-- Either Is_Composite_Type or Is_Elementary_Type (but not both) is true
-- of any type.
-- Is_Concurrent_Record_Type
-- Defined in record types and subtypes. Set if the type was created
-- by the expander to represent a task or protected type. For every
-- concurrent type, such as record type is constructed, and task and
-- protected objects are instances of this record type at run time
-- (The backend will replace declarations of the concurrent type using
-- the declarations of the corresponding record type). See Exp_Ch9 for
-- further details.
-- Is_Concurrent_Type (synthesized)
-- Applies to all entities, true for task types and subtypes and for
-- protected types and subtypes.
-- Is_Constant_Object (synthesized)
-- Applies to all entities, true for E_Constant, E_Loop_Parameter, and
-- E_In_Parameter entities.
-- Is_Constrained
-- Defined in types or subtypes which may have index, discriminant
-- or range constraint (i.e. array types and subtypes, record types
-- and subtypes, string types and subtypes, and all numeric types).
-- Set if the type or subtype is constrained.
-- Is_Constr_Subt_For_U_Nominal
-- Defined in all types and subtypes. Set only for the constructed
-- subtype of an object whose nominal subtype is unconstrained. Note
-- that the constructed subtype itself will be constrained.
-- Is_Constr_Subt_For_UN_Aliased
-- Defined in all types and subtypes. This flag can be set only if
-- Is_Constr_Subt_For_U_Nominal is also set. It indicates that in
-- addition the object concerned is aliased. This flag is used by
-- the backend to determine whether a template must be constructed.
-- 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. is either a descendant of Ada.Finalization.Controlled or of
-- Ada.Finalization.Limited_Controlled.
-- Is_Controlled (synth) [base type only]
-- Defined in all type entities. Set if Is_Controlled_Active is set for
-- the type, and Disable_Controlled is not set.
-- Is_Controlling_Formal
-- Defined in all Formal_Kind entities. Marks the controlling parameters
-- of dispatching operations.
-- Is_CPP_Class
-- 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_CUDA_Kernel
-- Defined in function and procedure entities. Set if the subprogram is a
-- CUDA kernel.
-- Is_Decimal_Fixed_Point_Type (synthesized)
-- Applies to all type entities, true for decimal fixed point
-- types and subtypes.
-- Is_Descendant_Of_Address
-- Defined in all entities. True if the entity is type System.Address,
-- or (recursively) a subtype or derived type of System.Address.
-- Is_DIC_Procedure
-- Defined in functions and procedures. Set for a generated procedure
-- which verifies the assumption of pragma Default_Initial_Condition at
-- run time.
-- Is_Discrete_Or_Fixed_Point_Type (synthesized)
-- Applies to all entities, true for all discrete types and subtypes
-- and all fixed-point types and subtypes.
-- Is_Discrete_Type (synthesized)
-- Applies to all entities, true for all discrete types and subtypes
-- Is_Discrim_SO_Function
-- Defined in all entities. Set only in E_Function entities that Layout
-- creates to compute discriminant-dependent dynamic size/offset values.
-- Is_Discriminant_Check_Function
-- Defined in all entities. Set only in E_Function entities for functions
-- created to do discriminant checks.
-- Is_Discriminal (synthesized)
-- Applies to all entities, true for renamings of discriminants. Such
-- entities appear as constants or IN parameters.
-- Is_Dispatch_Table_Entity
-- Applies to all entities. Set to indicate to the backend that this
-- entity is associated with a dispatch table.
-- Is_Dispatch_Table_Wrapper
-- Applies to all entities. Set on wrappers built when the subprogram has
-- class-wide preconditions or class-wide postconditions affected by
-- overriding (AI12-0195).
-- Is_Dispatching_Operation
-- Defined in all entities. Set for procedures, functions, generic
-- procedures, and generic functions if the corresponding operation
-- is dispatching.
-- Is_Dynamic_Scope (synthesized)
-- Applies to all Entities. Returns True if the entity is a dynamic
-- scope (i.e. a block, subprogram, task_type, entry or extended return
-- statement).
-- Is_Elaboration_Checks_OK_Id
-- Defined in elaboration targets (see terminology in Sem_Elab). Set when
-- the target appears in a region which is subject to elabled elaboration
-- checks. Such targets are allowed to generate run-time conditional ABE
-- checks or guaranteed ABE failures.
-- Is_Elaboration_Target (synthesized)
-- Applies to all entities, True only for elaboration targets (see the
-- terminology in Sem_Elab).
-- Is_Elaboration_Warnings_OK_Id
-- Defined in elaboration targets (see terminology in Sem_Elab). Set when
-- the target appears in a region with elaboration warnings enabled.
-- Is_Elementary_Type (synthesized)
-- Applies to all entities, True for all elementary types and subtypes.
-- Either Is_Composite_Type or Is_Elementary_Type (but not both) is true
-- of any type.
-- Is_Eliminated
-- Defined in type entities, subprogram entities, and object entities.
-- Indicates that the corresponding entity has been eliminated by use
-- of pragma Eliminate. Also used to mark subprogram entities whose
-- declaration and body are within unreachable code that is removed.
-- Is_Entry (synthesized)
-- Applies to all entities, True only for entry and entry family
-- entities and False for all other entity kinds.
-- Is_Entry_Formal
-- Defined in all entities. Set only for entry formals (which can only
-- be in, in-out or out parameters). This flag is used to speed up the
-- test for the need to replace references in Exp_Ch2.
-- Is_Entry_Wrapper
-- Defined on wrappers created for entries that have precondition aspects
-- Is_Enumeration_Type (synthesized)
-- Defined in all entities, true for enumeration types and subtypes
-- Is_Exception_Handler
-- Defined in blocks. Set if the block serves only as a scope of an
-- exception handler with a choice parameter. Such a block does not
-- physically appear in the tree.
-- Is_Exported
-- Defined in all entities. Set if the entity is exported. For now we
-- only allow the export of constants, exceptions, functions, procedures
-- and variables, but that may well change later on. Exceptions can only
-- be exported in the Java VM implementation of GNAT, which is retired.
-- Is_External_State (synthesized)
-- Applies to all entities, true for abstract states that are subject to
-- option External or Synchronous.
-- Is_Finalized_Transient
-- Defined in constants, loop parameters of generalized iterators, and
-- variables. Set when a transient object has been finalized by one of
-- the transient finalization mechanisms. The flag prevents the double
-- finalization of the object.
-- Is_Finalizer (synthesized)
-- Applies to all entities, true for procedures containing finalization
-- code to process local or library level objects.
-- Is_First_Subtype
-- Defined in all entities. True for first subtypes (RM 3.2.1(6)),
-- i.e. the entity in the type declaration that introduced the type.
-- This may be the base type itself (e.g. for record declarations and
-- enumeration type declarations), or it may be the first subtype of
-- an anonymous base type (e.g. for integer type declarations or
-- constrained array declarations).
-- Is_Fixed_Lower_Bound_Array_Subtype
-- Defined in type entities. True for unconstrained array types and
-- subtypes where at least one index has a range specified with a fixed
-- lower bound (range syntax is "<expression> .. <>").
-- Is_Fixed_Lower_Bound_Index_Subtype
-- Defined in type entities. True for an index of an unconstrained array
-- type or subtype whose range is specified with a fixed lower bound
-- (range syntax is "<expression> .. <>").
-- Is_Fixed_Point_Type (synthesized)
-- Applies to all entities, true for decimal and ordinary fixed
-- point types and subtypes.
-- Is_Floating_Point_Type (synthesized)
-- Applies to all entities, true for float types and subtypes
-- Is_Formal (synthesized)
-- Applies to all entities, true for IN, IN OUT and OUT parameters
-- Is_Formal_Object (synthesized)
-- Applies to all entities, true for generic IN and IN OUT parameters
-- Is_Formal_Subprogram
-- Defined in all entities. Set for generic formal subprograms.
-- Is_Frozen
-- Defined in all type and subtype entities. Set if type or subtype has
-- been frozen.
-- Is_Generic_Actual_Subprogram
-- Defined on functions and procedures. Set on the entity of the renaming
-- declaration created within an instance for an actual subprogram.
-- Used to generate constraint checks on calls to these subprograms, even
-- within an instance of a predefined run-time unit, in which checks
-- are otherwise suppressed.
-- Is_Generic_Actual_Type
-- Defined in all type and subtype entities. Set in the subtype
-- declaration that renames the generic formal as a subtype of the
-- actual. Guarantees that the subtype is not static within the instance.
-- Also used during analysis of an instance, to simplify resolution of
-- accidental overloading that occurs when different formal types get the
-- same actual.
-- Is_Generic_Instance
-- Defined in all entities. Set to indicate that the entity is an
-- instance of a generic unit, or a formal package (which is an instance
-- of the template).
-- Is_Generic_Subprogram (synthesized)
-- Applies to all entities. Yields True for a generic subprogram
-- (generic function, generic subprogram), False for all other entities.
-- Is_Generic_Type
-- Defined in all entities. Set for types which are generic formal types.
-- Such types have an Ekind that corresponds to their classification, so
-- the Ekind cannot be used to identify generic formal types.
-- Is_Generic_Unit (synthesized)
-- Applies to all entities. Yields True for a generic unit (generic
-- package, generic function, generic procedure), and False for all
-- other entities.
-- Is_Ghost_Entity (synthesized)
-- Applies to all entities. Yields True for abstract states, [generic]
-- packages, [generic] subprograms, components, discriminants, formal
-- parameters, objects, package bodies, subprogram bodies, and [sub]types
-- subject to pragma Ghost or those that inherit the Ghost property from
-- an enclosing construct.
-- Is_Hidden
-- Defined in all entities. Set for all entities declared in the
-- private part or body of a package. Also marks generic formals of a
-- formal package declared without a box. For library level entities,
-- this flag is set if the entity is not publicly visible. This flag
-- is reset when compiling the body of the package where the entity
-- is declared, when compiling the private part or body of a public
-- child unit, and when compiling a private child unit (see Install_
-- Private_Declaration in sem_ch7).
-- Is_Hidden_Non_Overridden_Subpgm
-- Defined in all entities. Set for implicitly declared subprograms
-- that require overriding or are null procedures, and are hidden by
-- a non-fully conformant homograph with the same characteristics
-- (Ada RM 8.3 12.3/2).
-- Is_Hidden_Open_Scope
-- Defined in all entities. Set for a scope that contains the
-- instantiation of a child unit, and whose entities are not visible
-- during analysis of the instance.
-- Is_Ignored_Ghost_Entity
-- Applies to all entities. Set for abstract states, [generic] packages,
-- [generic] subprograms, components, discriminants, formal parameters,
-- objects, package bodies, subprogram bodies, and [sub]types subject to
-- pragma Ghost or inherit "ghostness" from an enclosing construct, and
-- subject to Assertion_Policy Ghost => Ignore.
-- Is_Ignored_Transient
-- Defined in constants, loop parameters of generalized iterators, and
-- variables. Set when a transient object must be processed by one of
-- the transient finalization mechanisms. Once marked, a transient is
-- intentionally ignored by the general finalization mechanism because
-- its clean up actions are context specific.
-- Is_Immediately_Visible
-- Defined in all entities. Set if entity is immediately visible, i.e.
-- is defined in some currently open scope (RM 8.3(4)).
-- Is_Implementation_Defined
-- Defined in all entities. Set if a pragma Implementation_Defined is
-- applied to the pragma. Used to mark all implementation defined
-- identifiers in standard library packages, and to implement the
-- restriction No_Implementation_Identifiers.
-- Is_Imported
-- Defined in all entities. Set if the entity is imported. For now we
-- only allow the import of exceptions, functions, procedures, packages,
-- constants, and variables. Exceptions, packages, and types can only be
-- imported in the Java VM implementation, which is retired.
-- Is_Incomplete_Or_Private_Type (synthesized)
-- Applies to all entities, true for private and incomplete types
-- Is_Incomplete_Type (synthesized)
-- Applies to all entities, true for incomplete types and subtypes
-- Is_Independent
-- Defined in all types and objects. Set if a valid pragma or aspect
-- Independent applies to the entity, or for a component if a valid
-- pragma or aspect Independent_Components applies to the enclosing
-- record type. Also set if a pragma Shared or pragma Atomic applies to
-- the entity, or if the declaration of the entity carries the Aliased
-- keyword. For Ada 2012, also applies to formal parameters. In the
-- case of private and incomplete types, this flag is set in both the
-- partial view and the full view.
-- Is_Initial_Condition_Procedure
-- Defined in functions and procedures. Set for a generated procedure
-- which verifies the assumption of pragma Initial_Condition at run time.
-- Is_Inlined
-- Defined in all entities. Set for functions and procedures which are
-- to be inlined. For subprograms created during expansion, this flag
-- may be set directly by the expander to request inlining. Also set
-- for packages that contain inlined subprograms, whose bodies must be
-- be compiled. Is_Inlined is also set on generic subprograms and is
-- inherited by their instances. It is also set on the body entities
-- of inlined subprograms. See also Has_Pragma_Inline.
-- Is_Inlined_Always
-- Defined in subprograms. Set for functions and procedures which are
-- always inlined in GNATprove mode. GNATprove uses this flag to know
-- when a body does not need to be analyzed. The value of this flag is
-- only meaningful if Body_To_Inline is not Empty for the subprogram.
-- Is_Instantiated
-- Defined in generic packages and generic subprograms. Set if the unit
-- is instantiated from somewhere in the extended main source unit. This
-- flag is used to control warnings about the unit being uninstantiated.
-- Also set in a package that is used as an actual for a generic package
-- formal in an instantiation. Also set on a parent instance, in the
-- instantiation of a child, which is implicitly declared in the parent.
-- Is_Integer_Type (synthesized)
-- Applies to all entities, true for integer types and subtypes
-- Is_Interface
-- Defined in record types and subtypes. Set to indicate that the current
-- entity corresponds to an abstract interface. Because abstract
-- interfaces are conceptually a special kind of abstract tagged type
-- we represent them by means of tagged record types and subtypes
-- marked with this attribute. This allows us to reuse most of the
-- compiler support for abstract tagged types to implement interfaces
-- (Ada 2005: AI-251).
-- Is_Internal
-- Defined in all entities. Set to indicate an entity created during
-- semantic processing (e.g. an implicit type, or a temporary). The
-- current uses of this flag are:
--
-- 1) Internal entities (such as temporaries generated for the result
-- of an inlined function call or dummy variables generated for the
-- debugger). Set to indicate that they need not be initialized, even
-- when scalars are initialized or normalized.
--
-- 2) Predefined primitives of tagged types. Set to mark that they
-- have specific properties: first they are primitives even if they
-- are not defined in the type scope (the freezing point is not
-- necessarily in the same scope), and second the predefined equality
-- can be overridden by a user-defined equality, no body will be
-- generated in this case.
--
-- 3) Object declarations generated by the expander that are implicitly
-- imported or exported so that they can be marked in Sprint output.
--
-- 4) Internal entities in the list of primitives of tagged types that
-- are used to handle secondary dispatch tables. These entities have
-- also the attribute Interface_Alias.
-- Is_Interrupt_Handler
-- Defined in procedures. Set if a pragma Interrupt_Handler applies
-- to the procedure. The procedure must be a parameterless protected
-- procedure.
-- Is_Intrinsic_Subprogram
-- Defined in functions and procedures. It is set if a valid pragma
-- Interface or Import is present for this subprogram specifying
-- convention Intrinsic. Valid means that the name and profile of the
-- subprogram match the requirements of one of the recognized intrinsic
-- subprograms (see package Sem_Intr for details). Note: the value of
-- Convention for such an entity will be set to Convention_Intrinsic,
-- but it is the setting of Is_Intrinsic_Subprogram, NOT simply having
-- convention set to intrinsic, which causes intrinsic code to be
-- generated.
-- Is_Invariant_Procedure
-- Defined in functions and procedures. Set for a generated invariant
-- procedure which verifies the invariants of both the partial and full
-- views of a private type or private extension as well as any inherited
-- class-wide invariants from parent types or interfaces.
-- Is_Itype
-- Defined in all entities. Set to indicate that a type is an Itype,
-- which means that the declaration for the type does not appear
-- explicitly in the tree. Instead the backend will elaborate the type
-- when it is first used. Has_Delayed_Freeze can be set for Itypes, and
-- the meaning is that the first use (the one which causes the type to be
-- defined) will be the freeze node. Note that an important restriction
-- on Itypes is that the first use of such a type (the one that causes it
-- to be defined) must be in the same scope as the type.
-- Is_Known_Non_Null
-- Defined in all entities. Relevant (and can be set) only for
-- objects of an access type. It is set if the object is currently
-- known to have a non-null value (meaning that no access checks
-- are needed). The indication can for example come from assignment
-- of an access parameter or an allocator whose value is known non-null.
--
-- Note: this flag is set according to the sequential flow of the
-- program, watching the current value of the variable. However, this
-- processing can miss cases of changing the value of an aliased or
-- constant object, so even if this flag is set, it should not be
-- believed if the variable is aliased or volatile. It would be a
-- little neater to avoid the flag being set in the first place in
-- such cases, but that's trickier, and there is only one place that
-- tests the value anyway.
--
-- The flag is dynamically set and reset as semantic analysis and
-- expansion proceeds. Its value is meaningless once the tree is
-- fully constructed, since it simply indicates the last state.
-- Thus this flag has no meaning to the backend.
-- Is_Known_Null
-- Defined in all entities. Relevant (and can be set ) only for
-- objects of an access type. It is set if the object is currently known
-- to have a null value (meaning that a dereference will surely raise
-- constraint error exception). The indication can come from an
-- assignment or object declaration.
--
-- The comments above about sequential flow and aliased and volatile for
-- the Is_Known_Non_Null flag apply equally to the Is_Known_Null flag.
-- Is_Known_Valid
-- Defined in all entities. Relevant for types (and subtype) and
-- for objects (and enumeration literals) of a discrete type.
--
-- The purpose of this flag is to implement the requirement stated
-- in (RM 13.9.1(9-11)) which require that the use of possibly invalid
-- values may not cause programs to become erroneous. See the function
-- Checks.Expr_Known_Valid for further details. Note that the setting
-- is conservative, in the sense that if the flag is set, it must be
-- right. If the flag is not set, nothing is known about the validity.
--
-- For enumeration literals, the flag is always set, since clearly
-- an enumeration literal represents a valid value. Range checks
-- where necessary will ensure that this valid value is appropriate.
--
-- For objects, the flag indicates the state of knowledge about the
-- current value of the object. This may be modified during expansion,
-- and thus the final value is not relevant to the backend.
--
-- For types and subtypes, the flag is set if all possible bit patterns
-- of length Object_Size (i.e. Esize of the type) represent valid values
-- of the type. In general for such types, all values are valid, the
-- only exception being the case where an object of the type has an
-- explicit size that is greater than Object_Size.
--
-- For non-discrete objects, the setting of the Is_Known_Valid flag is
-- not defined, and is not relevant, since the considerations of the
-- requirement in (RM 13.9.1(9-11)) do not apply.
--
-- The flag is dynamically set and reset as semantic analysis and
-- expansion proceeds. Its value is meaningless once the tree is
-- fully constructed, since it simply indicates the last state.
-- Thus this flag has no meaning to the backend.
-- Is_Limited_Composite
-- Defined in all entities. Set for composite types that have a limited
-- component. Used to enforce the rule that operations on the composite
-- type that depend on the full view of the component do not become
-- visible until the immediate scope of the composite type itself
-- (RM 7.3.1 (5)).
-- Is_Limited_Interface
-- Defined in record types and subtypes. True for interface types, if
-- interface is declared limited, task, protected, or synchronized, or
-- is derived from a limited interface.
-- Is_Limited_Record
-- Defined in all entities. Set to true for record (sub)types if the
-- record is declared to be limited. Note that this flag is not set
-- simply because some components of the record are limited.
-- Is_Local_Anonymous_Access
-- Defined in access types. Set for an anonymous access type to indicate
-- that the type is created for a record component with an access
-- definition, an array component, or (pre-Ada 2012) a standalone object.
-- Such anonymous types have an accessibility level equal to that of the
-- declaration in which they appear, unlike the anonymous access types
-- that are created for access parameters, access discriminants, and
-- (as of Ada 2012) stand-alone objects.
-- Is_Loop_Parameter
-- Applies to all entities. Certain loops, in particular "for ... of"
-- loops, get transformed so that the loop parameter is declared by a
-- variable declaration, so the entity is an E_Variable. This is True for
-- such E_Variables; False otherwise.
-- Is_Machine_Code_Subprogram
-- Defined in subprogram entities. Set to indicate that the subprogram
-- is a machine code subprogram (i.e. its body includes at least one
-- code statement). Also indicates that all necessary semantic checks
-- as required by RM 13.8(3) have been performed.
-- Is_Modular_Integer_Type (synthesized)
-- Applies to all entities. True if entity is a modular integer type
-- Is_Non_Static_Subtype
-- Defined in all type and subtype entities. It is set in some (but not
-- all) cases in which a subtype is known to be non-static. Before this
-- flag was added, the computation of whether a subtype was static was
-- entirely synthesized, by looking at the bounds, and the immediate
-- subtype parent. However, this method does not work for some Itypes
-- that have no parent set (and the only way to find the immediate
-- subtype parent is to go through the tree). For now, this flag is set
-- conservatively, i.e. if it is set then for sure the subtype is non-
-- static, but if it is not set, then the type may or may not be static.
-- Thus the test for a static subtype is that this flag is clear AND that
-- the bounds are static AND that the parent subtype (if available to be
-- tested) is static. Eventually we should make sure this flag is always
-- set right, at which point, these comments can be removed, and the
-- tests for static subtypes greatly simplified.
-- Is_Null_Init_Proc
-- Defined in procedure entities. Set for generated init proc procedures
-- (used to initialize composite types), if the code for the procedure
-- is null (i.e. is a return and nothing else). Such null initialization
-- procedures are generated in case some client is compiled using the
-- Initialize_Scalars pragma, generating a call to this null procedure,
-- but there is no need to call such procedures within a compilation
-- unit, and this flag is used to suppress such calls.
-- Is_Null_State (synthesized)
-- Applies to all entities, true for an abstract state declared with
-- keyword null.
-- Is_Numeric_Type (synthesized)
-- Applies to all entities, true for all numeric types and subtypes
-- (integer, fixed, float).
-- Is_Object (synthesized)
-- Applies to all entities, true for entities representing objects,
-- including generic formal parameters.
-- Is_Obsolescent
-- Defined in all entities. Set for any entity to which a valid pragma
-- or aspect Obsolescent applies.
-- Is_Only_Out_Parameter
-- Defined in formal parameter entities. Set if this parameter is the
-- only OUT parameter for this formal part. If there is more than one
-- out parameter, or if there is some other IN OUT parameter then this
-- flag is not set in any of them. Used in generation of warnings.
-- Is_Ordinary_Fixed_Point_Type (synthesized)
-- Applies to all entities, true for ordinary fixed point types and
-- subtypes.
-- Is_Package_Body_Entity
-- Defined in all entities. Set for entities defined at the top level
-- of a package body. Used to control externally generated names.
-- Is_Package_Or_Generic_Package (synthesized)
-- Applies to all entities. True for packages and generic packages.
-- False for all other entities.
-- Is_Packed [implementation base type only]
-- Defined in all type entities. This flag is set only for record and
-- array types which have a packed representation. There are four cases
-- which cause packing:
--
-- 1. Explicit use of pragma Pack to pack a record.
-- 2. Explicit use of pragma Pack to pack an array.
-- 3. Setting Component_Size of an array to a packable value.
-- 4. Indexing an array with a non-standard enumeration type.
--
-- For records, Is_Packed is always set if Has_Pragma_Pack is set, and
-- can also be set on its own in a derived type which inherited its
-- packed status.
--
-- For arrays, Is_Packed is set if either Has_Pragma_Pack is set and the
-- component size is either not known at compile time or known but not
-- 8/16/32/64 bits, or a Component_Size clause exists and the specified
-- value is smaller than 64 bits but not 8/16/32, or if the array has one
-- or more index types that are enumeration types with a non-standard
-- representation (in GNAT, we store such arrays compactly, using the Pos
-- of the enumeration type value). As for the case of records, Is_Packed
-- can be set on its own for a derived type.
-- Before an array type is frozen, Is_Packed will always be set if
-- Has_Pragma_Pack is set. Before the freeze point, it is not possible
-- to know the component size, since the component type is not frozen
-- until the array type is frozen. Thus Is_Packed for an array type
-- before it is frozen means that packed is required. Then if it turns
-- out that the component size doesn't require packing, the Is_Packed
-- flag gets turned off.
-- In the bit-packed array case (i.e. the component size is known by the
-- front end and is in the range 1-63 but not a multiple of 8), then the
-- Is_Bit_Packed_Array flag will be set once the array type is frozen.
--
-- Is_Packed_Array (synth)
-- Applies to all entities, true if entity is for a packed array.
-- Is_Packed_Array_Impl_Type
-- Defined in all entities. This flag is set on the entity for the type
-- used to implement a packed array (either a modular type or a subtype
-- of Packed_Bytes{1,2,4} in the bit-packed array case, a regular array
-- in the non-standard enumeration index case). It is set if and only
-- if the type appears in the Packed_Array_Impl_Type field of some other
-- entity. It is used by the back end to activate the special processing
-- for such types (unchecked conversions that would not otherwise be
-- allowed are allowed for such types). If Is_Packed_Array_Impl_Type is
-- set in an entity, then the Original_Array_Type field of this entity
-- points to the array type for which this is the Packed_Array_Impl_Type.
-- Is_Param_Block_Component_Type [base type only]
-- Defined in access types. Set to indicate that a type is the type of a
-- component of the parameter block record type generated by the compiler
-- for an entry or a select statement. Read by CodePeer.
-- Is_Partial_Invariant_Procedure
-- Defined in functions and procedures. Set for a generated invariant
-- procedure which verifies the invariants of the partial view of a
-- private type or private extension.
-- Is_Potentially_Use_Visible
-- Defined in all entities. Set if entity is potentially use visible,
-- i.e. it is defined in a package that appears in a currently active
-- use clause (RM 8.4(8)). Note that potentially use visible entities
-- are not necessarily use visible (RM 8.4(9-11)).
-- Is_Predicate_Function
-- Present in functions and procedures. Set for generated predicate
-- functions.
-- Is_Predicate_Function_M
-- Present in functions and procedures. Set for special version of
-- predicate function generated for use in membership tests, where
-- raise expressions are transformed to return False.
-- Is_Preelaborated
-- Defined in all entities, set in E_Package and E_Generic_Package
-- entities to which a pragma Preelaborate is applied, and also in
-- all entities within such packages. Note that the fact that this
-- flag is set does not necesarily mean that no elaboration code is
-- generated for the package.
-- Is_Primitive
-- Defined in overloadable entities and in generic subprograms. Set to
-- indicate that this is a primitive operation of some type, which may
-- be a tagged type or an untagged type. Used to verify overriding
-- indicators in bodies.
-- Is_Primitive_Wrapper
-- Defined in functions and procedures created by the expander to serve
-- as an indirection mechanism to overriding primitives of concurrent
-- types, entries and protected procedures.
-- Is_Prival (synthesized)
-- Applies to all entities, true for renamings of private protected
-- components. Such entities appear as constants or variables.
-- Is_Private_Composite
-- Defined in composite types that have a private component. Used to
-- enforce the rule that operations on the composite type that depend
-- on the full view of the component, do not become visible until the
-- immediate scope of the composite type itself (7.3.1 (5)). Both this
-- flag and Is_Limited_Composite are needed.
-- Is_Private_Descendant
-- Defined in entities that can represent library units (packages,
-- functions, procedures). Set if the library unit is itself a private
-- child unit, or if it is the descendant of a private child unit.
-- Is_Private_Primitive
-- Defined in subprograms. Set if the operation is a primitive of a
-- tagged type (procedure or function dispatching on result) whose
-- full view has not been seen. Used in particular for primitive
-- subprograms of a synchronized type declared between the two views
-- of the type, so that the wrapper built for such a subprogram can
-- be given the proper signature.
-- Is_Private_Type (synthesized)
-- Applies to all entities, true for private types and subtypes,
-- as well as for record with private types as subtypes.
-- Is_Protected_Component (synthesized)
-- Applicable to all entities, true if the entity denotes a private
-- component of a protected type.
-- Is_Protected_Interface (synthesized)
-- Defined in types that are interfaces. True if interface is declared
-- protected, or is derived from protected interfaces.
-- Is_Protected_Record_Type (synthesized)
-- Applies to all entities, true if Is_Concurrent_Record_Type is true and
-- Corresponding_Concurrent_Type is a protected type.
-- Is_Protected_Type (synthesized)
-- Applies to all entities, true for protected types and subtypes
-- Is_Public
-- Defined in all entities. Set to indicate that an entity defined in
-- one compilation unit can be referenced from other compilation units.
-- If this reference causes a reference in the generated code, for
-- example in the case of a variable name, then the backend will generate
-- an appropriate external name for use by the linker.
-- Is_Pure
-- Defined in all entities. Set in all entities of a unit to which a
-- pragma Pure is applied except for non-intrinsic imported subprograms,
-- and also set for the entity of the unit itself. In addition, this
-- flag may be set for any other functions or procedures that are known
-- to be side effect free, so in the case of subprograms, the Is_Pure
-- flag may be used by the optimizer to imply that it can assume freedom
-- from side effects (other than those resulting from assignment to Out
-- or In Out parameters, or to objects designated by access parameters).
-- Is_Pure_Unit_Access_Type
-- Defined in access type and subtype entities. Set if the type or
-- subtype appears in a pure unit. Used to give an error message at
-- freeze time if the access type has a storage pool.
-- Is_RACW_Stub_Type
-- Defined in all types, true for the stub types generated for remote
-- access-to-class-wide types.
-- Is_Raised
-- Defined in exception entities. Set if the entity is referenced by a
-- a raise statement.
-- Is_Real_Type (synthesized)
-- Applies to all entities, true for real types and subtypes
-- Is_Record_Type (synthesized)
-- Applies to all entities, true for record types and subtypes,
-- includes class-wide types and subtypes (which are also records).
-- Is_Relaxed_Initialization_State (synthesized)
-- Applies to all entities, true for abstract states that are subject to
-- option Relaxed_Initialization.
-- Is_Remote_Call_Interface
-- Defined in all entities. Set in E_Package and E_Generic_Package
-- entities to which a pragma Remote_Call_Interface is applied, and
-- also on entities declared in the visible part of such a package.
-- Is_Remote_Types
-- Defined in all entities. Set in E_Package and E_Generic_Package
-- entities to which a pragma Remote_Types is applied, and also on
-- entities declared in the visible part of the spec of such a package.
-- Also set for types which are generic formal types to which the
-- pragma Remote_Access_Type applies.
-- Is_Renaming_Of_Object
-- Defined in all entities, set only for a variable or constant for
-- which the Renamed_Object field is non-empty and for which the
-- renaming is handled by the front end, by macro substitution of
-- a copy of the (evaluated) name tree whereever the variable is used.
-- Is_Return_Object
-- Defined in all object entities. True if the object is the return
-- object of an extended_return_statement; False otherwise.
-- Is_Safe_To_Reevaluate
-- Defined in all entities. Set in variables that are initialized by
-- means of an assignment statement. When initialized their contents
-- never change and hence they can be seen by the backend as constants.
-- See also Is_True_Constant.
-- Is_Scalar_Type (synthesized)
-- Applies to all entities, true for scalar types and subtypes
-- Is_Shared_Passive
-- Defined in all entities. Set in E_Package and E_Generic_Package
-- entities to which a pragma Shared_Passive is applied, and also in
-- all entities within such packages.
-- Is_Standard_Character_Type (synthesized)
-- Applies to all entities, true for types and subtypes whose root type
-- is one of the standard character types (Character, Wide_Character, or
-- Wide_Wide_Character).
-- Is_Standard_String_Type (synthesized)
-- Applies to all entities, true for types and subtypes whose root
-- type is one of the standard string types (String, Wide_String, or
-- Wide_Wide_String).
-- Is_Static_Type
-- Defined in entities. Only set for (sub)types. If set, indicates that
-- the type is known to be a static type (defined as a discrete type with
-- static bounds, a record all of whose component types are static types,
-- or an array, all of whose bounds are of a static type, and also have
-- a component type that is a static type). See Set_Uplevel_Type for more
-- information on how this flag is used.
-- Is_Statically_Allocated
-- Defined in all entities. This can only be set for exception,
-- variable, constant, and type/subtype entities. If the flag is set,
-- then the variable or constant must be allocated statically rather
-- than on the local stack frame. For exceptions, the meaning is that
-- the exception data should be allocated statically (and indeed this
-- flag is always set for exceptions, since exceptions do not have
-- local scope). For a type, the meaning is that the type must be
-- elaborated at the global level rather than locally. No type marked
-- with this flag may depend on a local variable, or on any other type
-- which does not also have this flag set to True. For a variable or
-- or constant, if the flag is set, then the type of the object must
-- either be declared at the library level, or it must also have the
-- flag set (since to allocate the object statically, its type must
-- also be elaborated globally).
-- Is_String_Type (synthesized)
-- Applies to all type entities. Determines if the given type is a
-- string type, i.e. it is directly a string type or string subtype,
-- or a string slice type, or an array type with one dimension and a
-- component type that is a character type.
-- Is_Subprogram (synthesized)
-- Applies to all entities, true for function, procedure and operator
-- entities.
-- Is_Subprogram_Or_Generic_Subprogram
-- Applies to all entities, true for function procedure and operator
-- entities, and also for the corresponding generic entities.
-- Is_Synchronized_Interface (synthesized)
-- Defined in types that are interfaces. True if interface is declared
-- synchronized, task, or protected, or is derived from a synchronized
-- interface.
-- Is_Synchronized_State (synthesized)
-- Applies to all entities, true for abstract states that are subject to
-- option Synchronous.
-- Is_Tag
-- Defined in E_Component and E_Constant entities. For regular tagged
-- type this flag is set on the tag component (whose name is Name_uTag).
-- For CPP_Class tagged types, this flag marks the pointer to the main
-- vtable (i.e. the one to be extended by derivation).
-- Is_Tagged_Type
-- Defined in all entities, set for an entity that is a tagged type
-- Is_Task_Interface (synthesized)
-- Defined in types that are interfaces. True if interface is declared as
-- a task interface, or if it is derived from task interfaces.
-- Is_Task_Record_Type (synthesized)
-- Applies to all entities, true if Is_Concurrent_Record_Type is true and
-- Corresponding_Concurrent_Type is a task type.
-- Is_Task_Type (synthesized)
-- Applies to all entities. True for task types and subtypes
-- Is_Thunk
-- Defined in all entities. True for subprograms that are thunks: that is
-- small subprograms built by the expander for tagged types that cover
-- interface types. As part of the runtime call to an interface, thunks
-- displace the pointer to the object (pointer named "this" in the C++
-- terminology) from a secondary dispatch table to the primary dispatch
-- table associated with a given tagged type; if the thunk is a function
-- that returns an object which covers an interface type then the thunk
-- displaces the pointer to the object from the primary dispatch table to
-- the secondary dispatch table associated with the interface type. Set
-- by Expand_Interface_Thunk and used by Expand_Call to handle extra
-- actuals associated with accessibility level.
-- Is_Trivial_Subprogram
-- Defined in all entities. Set in subprograms where either the body
-- consists of a single null statement, or the first or only statement
-- of the body raises an exception. This is used for suppressing certain
-- warnings, see Sem_Ch6.Analyze_Subprogram_Body discussion for details.
-- Is_True_Constant
-- Defined in all entities for constants and variables. Set in constants
-- and variables which have an initial value specified but which are
-- never assigned, partially or in the whole. For variables, it means
-- that the variable was initialized but never modified, and hence can be
-- treated as a constant by the code generator. For a constant, it means
-- that the constant was not modified by generated code (e.g. to set a
-- discriminant in an init proc). Assignments by user or generated code
-- will reset this flag. See also Is_Safe_To_Reevaluate.
-- Is_Type (synthesized)
-- Applies to all entities, true for a type entity
-- Is_Unchecked_Union [implementation base type only]
-- Defined in all entities. Set only in record types to which the
-- pragma Unchecked_Union has been validly applied.
-- Is_Underlying_Full_View
-- Defined in all entities. Set for types which represent the true full
-- view of a private type completed by another private type. For further
-- details, see attribute Underlying_Full_View.
-- Is_Underlying_Record_View [base type only]
-- Defined in all entities. Set only in record types that represent the
-- underlying record view. This view is built for derivations of types
-- with unknown discriminants; it is a record with the same structure
-- 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
-- frozen. If set it indicates that the representation is known to be
-- unsigned (i.e. that no negative values appear in the range). This is
-- normally just a reflection of the lower bound of the subtype or base
-- type, but there is one case in which the setting is not obvious,
-- namely the case of an unsigned subtype of a signed type from which
-- a further subtype is obtained using variable bounds. This further
-- subtype is still unsigned, but this cannot be determined by looking
-- at its bounds or the bounds of the corresponding base type.
-- For a subtype indication whose range is statically a null range,
-- the flag is set if the lower bound is non-negative, but the flag
-- cannot be used to determine the comparison operator to emit in the
-- generated code: use the base type.
-- Is_Uplevel_Referenced_Entity
-- Defined in all entities. Used when unnesting subprograms to indicate
-- that an entity is locally defined within a subprogram P, and there is
-- a reference to the entity within a subprogram nested within P (at any
-- depth). Set for uplevel referenced objects (variables, constants,
-- discriminants and loop parameters), and also for upreferenced dynamic
-- types, including the cases where the reference is implicit (e.g. the
-- type of an array used for computing the location of an element in an
-- array. This is used internally in Exp_Unst, see this package for
-- further details.
-- Is_Valued_Procedure
-- Defined in procedure entities. Set if an Import_Valued_Procedure
-- or Export_Valued_Procedure pragma applies to the procedure entity.
-- Is_Visible_Formal
-- Defined in all entities. Set for instances of the formals of a
-- formal package. Indicates that the entity must be made visible in the
-- body of the instance, to reproduce the visibility of the generic.
-- This simplifies visibility settings in instance bodies.
-- Is_Visible_Lib_Unit
-- Defined in all (root or child) library unit entities. Once compiled,
-- library units remain chained to the entities in the parent scope, and
-- a separate flag must be used to indicate whether the names are visible
-- by selected notation, or not.
-- Is_Volatile
-- Defined in all type entities, and also in constants, components and
-- variables. Set if a pragma Volatile applies to the entity. Also set
-- if pragma Shared or pragma Atomic applies to entity. In the case of
-- private or incomplete types, this flag is set in both the private
-- and full view. The flag is not set reliably on private subtypes,
-- and is always retrieved from the base type (but this is not a base-
-- type-only attribute because it applies to other entities). Note that
-- the backend should use Treat_As_Volatile, rather than Is_Volatile
-- to indicate code generation requirements for volatile variables.
-- Similarly, any front end test which is concerned with suppressing
-- optimizations on volatile objects should test Treat_As_Volatile
-- rather than testing this flag.
-- This is a synthesized attribute in Einfo.Utils, based on
-- Is_Volatile_Type and Is_Volatile_Object. The latter two should be
-- used in preference to Is_Volatile when we know that we have a type
-- or an object.
-- Is_Volatile_Full_Access
-- Defined in all type entities, and also in constants, components, and
-- variables. Set if an aspect/pragma Volatile_Full_Access or an Ada 2022
-- aspect Full_Access_Only applies to the entity. In the case of private
-- and incomplete types, this flag is set in both the partial view and
-- the full view.
-- Is_Wrapper_Package (synthesized)
-- Defined in package entities. Indicates that the package has been
-- created as a wrapper for a subprogram instantiation.
-- Is_Wrapper
-- Defined in subprogram entities. Indicates that it has been created as
-- a wrapper to handle inherited class-wide pre/post conditions that call
-- overridden primitives or as a wrapper of a controlling function.
-- 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
-- more than once.
-- Kill_Elaboration_Checks
-- Defined in all entities. Set by the expander to kill elaboration
-- checks which are known not to be needed. Equivalent in effect to
-- the use of pragma Suppress (Elaboration_Checks) for that entity
-- except that the effect is permanent and cannot be undone by a
-- subsequent pragma Unsuppress.
-- Kill_Range_Checks
-- Defined in all entities. Equivalent in effect to the use of pragma
-- Suppress (Range_Checks) for that entity except that the result is
-- permanent and cannot be undone by a subsequent pragma Unsuppress.
-- This is currently only used in one odd situation in Sem_Ch3 for
-- record types, and it would be good to get rid of it???
-- Known_To_Have_Preelab_Init
-- Defined in all type and subtype entities. If set, then the type is
-- known to have preelaborable initialization. In the case of a partial
-- view of a private type, it is only possible for this to be set if a
-- pragma Preelaborable_Initialization is given for the type. For other