]> gcc.gnu.org Git - gcc.git/blame - gcc/ada/einfo.ads
ada: Accept Assert pragmas in expression functions
[gcc.git] / gcc / ada / einfo.ads
CommitLineData
70482933
RK
1------------------------------------------------------------------------------
2-- --
3-- GNAT COMPILER COMPONENTS --
573e5dd6 4-- --
70482933
RK
5-- E I N F O --
6-- --
7-- S p e c --
8-- --
cccef051 9-- Copyright (C) 1992-2023, Free Software Foundation, Inc. --
975c6896 10-- --
70482933
RK
11-- GNAT is free software; you can redistribute it and/or modify it under --
12-- terms of the GNU General Public License as published by the Free Soft- --
748086b7 13-- ware Foundation; either version 3, or (at your option) any later ver- --
70482933
RK
14-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
b740cf28
AC
16-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
17-- for more details. You should have received a copy of the GNU General --
18-- Public License distributed with GNAT; see file COPYING3. If not, go to --
19-- http://www.gnu.org/licenses for a complete copy of the license. --
70482933
RK
20-- --
21-- GNAT was originally developed by the GNAT team at New York University. --
71ff80dc 22-- Extensive contributions were provided by Ada Core Technologies Inc. --
70482933
RK
23-- --
24------------------------------------------------------------------------------
25
76f9c7f4 26pragma Warnings (Off); -- with/use clauses for children
a7cadd18 27with Namet; use Namet;
07fc65c4 28with Snames; use Snames;
a7cadd18
BD
29with Stand; use Stand;
30with Types; use Types;
31with Uintp; use Uintp;
70482933 32with Urealp; use Urealp;
76f9c7f4 33pragma Warnings (On);
70482933
RK
34
35package Einfo is
36
2e02ab86
BD
37-- This package documents the annotations to the abstract syntax tree that are
38-- needed to support semantic processing of an Ada compilation.
39
40-- See the spec of Gen_IL.Gen for instructions on making changes to this file.
41-- Note that the official definition of what entities have what fields is in
42-- Gen_IL.Gen.Gen_Entities; if there is a discrepancy between that and the
43-- comments here, Gen_IL.Gen.Gen_Entities wins.
82c80734 44
70482933
RK
45-- These annotations are for the most part attributes of declared entities,
46-- and they correspond to conventional symbol table information. Other
47-- attributes include sets of meanings for overloaded names, possible
48-- types for overloaded expressions, flags to indicate deferred constants,
2e02ab86
BD
49-- incomplete types, etc. These attributes are stored in fields in
50-- tree nodes.
70482933
RK
51
52-- There are two kinds of semantic information
53
54-- First, the tree nodes with the following Nkind values:
55
56-- N_Defining_Identifier
57-- N_Defining_Character_Literal
58-- N_Defining_Operator_Symbol
59
60-- are called Entities, and constitute the information that would often
61-- be stored separately in a symbol table. These nodes are all extended
62-- to provide extra space, and contain fields which depend on the entity
63-- kind, as defined by the contents of the Ekind field. The use of the
64-- Ekind field, and the associated fields in the entity, are defined
65-- in this package, as are the access functions to these fields.
66
67-- Second, in some cases semantic information is stored directly in other
68-- kinds of nodes, e.g. the Etype field, used to indicate the type of an
2e02ab86
BD
69-- expression. These fields are defined in the Sinfo package, but their
70-- full documentation is in the Einfo package specification.
70482933
RK
71
72-- Declaration processing places information in the nodes of their defining
73-- identifiers. Name resolution places in all other occurrences of an
74-- identifier a pointer to the corresponding defining occurrence.
75
70482933
RK
76----------------------------------
77-- Handling of Type'Size Values --
78----------------------------------
79
a90bd866 80-- The Ada 95 RM contains some rather peculiar (to us) rules on the value
70482933
RK
81-- of type'Size (see RM 13.3(55)). We have found that attempting to use
82-- these RM Size values generally, and in particular for determining the
00332244 83-- default size of objects, creates chaos, and major incompatibilities in
70482933
RK
84-- existing code.
85
81e68a19 86-- The Ada 2022 RM acknowledges it and adopts GNAT's Object_Size attribute
c846eedd
EB
87-- for determining the default size of objects, but stops short of applying
88-- it universally like GNAT. Indeed the notable exceptions are nonaliased
81e68a19 89-- stand-alone objects, which are not covered by Object_Size in Ada 2022.
c846eedd 90
70482933
RK
91-- We proceed as follows, for discrete and fixed-point subtypes, we have
92-- two separate sizes for each subtype:
93
94-- The Object_Size, which is used for determining the default size of
95-- objects and components. This size value can be referred to using the
96-- Object_Size attribute. The phrase "is used" here means that it is
c846eedd 97-- the basis of the determination of the size. The back end is free to
70482933
RK
98-- pad this up if necessary for efficiency, e.g. an 8-bit stand-alone
99-- character might be stored in 32 bits on a machine with no efficient
100-- byte access instructions such as the Alpha.
101
c846eedd 102-- The default rules for the value of Object_Size are as follows:
70482933
RK
103
104-- The Object_Size for base subtypes reflect the natural hardware
105-- size in bits (see Ttypes and Cstand for integer types). For
d7d99211 106-- enumeration and fixed-point base subtypes have 8, 16, 32, or 64
70482933
RK
107-- bits for this size, depending on the range of values to be stored.
108
109-- The Object_Size of a subtype is the same as the Object_Size of
110-- the subtype from which it is obtained.
111
112-- The Object_Size of a derived base type is copied from the parent
113-- base type, and the Object_Size of a derived first subtype is copied
114-- from the parent first subtype.
115
81e68a19 116-- The Ada 2022 RM defined attribute Object_Size uses this implementation.
c846eedd
EB
117
118-- The Value_Size, which is the number of bits required to store a value
70482933 119-- of the type. This size can be referred to using the Value_Size
c846eedd 120-- attribute. This value is used for determining how tightly to pack
70482933
RK
121-- records or arrays with components of this type, and also affects
122-- the semantics of unchecked conversion (unchecked conversions where
123-- the Value_Size values differ generate a warning, and are potentially
124-- target dependent).
125
db222ead 126-- The default rules for the value of Value_Size are as follows:
70482933
RK
127
128-- The Value_Size for a base subtype is the minimum number of bits
129-- required to store all values of the type (including the sign bit
130-- only if negative values are possible).
131
132-- If a subtype statically matches the first subtype, then it has
133-- by default the same Value_Size as the first subtype. This is a
134-- consequence of RM 13.1(14) ("if two subtypes statically match,
135-- then their subtype-specific aspects are the same".)
136
137-- All other subtypes have a Value_Size corresponding to the minimum
138-- number of bits required to store all values of the subtype. For
139-- dynamic bounds, it is assumed that the value can range down or up
db222ead 140-- to the corresponding bound of the ancestor.
70482933 141
c846eedd 142-- The Ada 95 RM defined attribute Size is identified with Value_Size.
70482933
RK
143
144-- The Size attribute may be defined for a first-named subtype. This sets
145-- the Value_Size of the first-named subtype to the given value, and the
146-- Object_Size of this first-named subtype to the given value padded up
147-- to an appropriate boundary. It is a consequence of the default rules
148-- above that this Object_Size will apply to all further subtypes. On the
5d37ba92 149-- other hand, Value_Size is affected only for the first subtype, any
70482933
RK
150-- dynamic subtypes obtained from it directly, and any statically matching
151-- subtypes. The Value_Size of any other static subtypes is not affected.
152
153-- Value_Size and Object_Size may be explicitly set for any subtype using
c846eedd 154-- an attribute definition clause. Note that the use of such a clause can
81e68a19 155-- cause the RM 13.1(14) rule to be violated, in Ada 95 and 2022 for the
c846eedd
EB
156-- Value_Size attribute, but only in Ada 95 for the Object_Size attribute.
157-- If access types reference aliased objects whose subtypes have differing
158-- Object_Size values as a result of explicit attribute definition clauses,
159-- then it is erroneous to convert from one access subtype to the other.
160
161-- At the implementation level, the Esize field stores the Object_Size
162-- and the RM_Size field stores the Value_Size (hence the value of the
70482933
RK
163-- Size attribute, which, as noted above, is equivalent to Value_Size).
164
165-- To get a feel for the difference, consider the following examples (note
166-- that in each case the base is short_short_integer with a size of 8):
167
168-- Object_Size Value_Size
169
170-- type x1 is range 0..5; 8 3
171
172-- type x2 is range 0..5;
93c3fca7 173-- for x2'size use 12; 16 12
70482933 174
93c3fca7 175-- subtype x3 is x2 range 0 .. 3; 16 2
70482933
RK
176
177-- subtype x4 is x2'base range 0 .. 10; 8 4
178
5389e4ae 179-- dynamic : x2'Base range -64 .. +63;
70482933 180
5389e4ae 181-- subtype x5 is x2 range 0 .. dynamic; 16 3*
70482933 182
5389e4ae
RD
183-- subtype x6 is x2'base range 0 .. dynamic; 8 7*
184
185-- Note: the entries marked * are not actually specified by the Ada 95 RM,
70482933
RK
186-- but it seems in the spirit of the RM rules to allocate the minimum number
187-- of bits known to be large enough to hold the given range of values.
188
189-- So far, so good, but GNAT has to obey the RM rules, so the question is
190-- under what conditions must the RM Size be used. The following is a list
191-- of the occasions on which the RM Size must be used:
192
193-- Component size for packed arrays or records
194-- Value of the attribute Size for a type
195-- Warning about sizes not matching for unchecked conversion
196
197-- The RM_Size field keeps track of the RM Size as needed in these
198-- three situations.
199
4f91a255
AC
200-- For elementary types other than discrete and fixed-point types, the
201-- Object_Size and Value_Size are the same (and equivalent to the RM
f3b57ab0 202-- attribute Size). Only Size may be specified for such types.
4f91a255
AC
203
204-- For composite types, Object_Size and Value_Size are computed from their
205-- respective value for the type of each element as well as the layout.
70482933 206
5d37ba92
ES
207-- All size attributes are stored as Uint values. Negative values are used to
208-- reference GCC expressions for the case of non-static sizes, as explained
209-- in Repinfo.
210
e2534738
AC
211--------------------------------------
212-- Delayed Freezing and Elaboration --
213--------------------------------------
214
215-- The flag Has_Delayed_Freeze indicates that an entity carries an explicit
216-- freeze node, which appears later in the expanded tree.
217
257baf5a 218-- a) The flag is used by the front end to trigger expansion activities which
e2534738
AC
219-- include the generation of that freeze node. Typically this happens at the
220-- end of the current compilation unit, or before the first subprogram body is
257baf5a 221-- encountered in the current unit. See units Freeze and Exp_Ch13 for details
e2534738
AC
222-- on the actions triggered by a freeze node, which include the construction
223-- of initialization procedures and dispatch tables.
224
9b0d7805
RD
225-- b) The flag is used by the back end to defer elaboration of the entity
226-- until its freeze node is seen. In the absence of an explicit freeze node,
227-- an entity is frozen (and elaborated) at the point of declaration.
e2534738
AC
228
229-- For object declarations, the flag is set when an address clause for the
230-- object is encountered. Legality checks on the address expression only take
257baf5a 231-- place at the freeze point of the object. In Ada 2012, the flag is also set
4c1e5395 232-- when an address aspect for the object is encountered.
e2534738
AC
233
234-- Most types have an explicit freeze node, because they cannot be elaborated
235-- until all representation and operational items that apply to them have been
236-- analyzed. Private types and incomplete types have the flag set as well, as
237-- do task and protected types.
238
257baf5a 239-- Implicit base types created for type derivations, as well as class-wide
e2534738
AC
240-- types created for all tagged types, have the flag set.
241
242-- If a subprogram has an access parameter whose designated type is incomplete
243-- the subprogram has the flag set.
244
70482933
RK
245-----------------------
246-- Entity Attributes --
247-----------------------
248
249-- This section contains a complete list of the attributes that are defined
250-- on entities. Some attributes apply to all entities, others only to certain
251-- kinds of entities. In the latter case the attribute should only be set or
252-- accessed if the Ekind field indicates an appropriate entity.
253
254-- There are two kinds of attributes that apply to entities, stored and
255-- synthesized. Stored attributes correspond to a field or flag in the entity
256-- itself. Such attributes are identified in the table below by giving the
257-- field or flag in the attribute that is used to hold the attribute value.
258-- Synthesized attributes are not stored directly, but are rather computed as
259-- needed from other attributes, or from information in the tree. These are
260-- marked "synthesized" in the table below. The stored attributes have both
261-- access functions and set procedures to set the corresponding values, while
262-- synthesized attributes have only access functions.
263
e95ad7ea
RD
264-- Note: in the case of Node, Uint, or Elist fields, there are cases where the
265-- same physical field is used for different purposes in different entities,
266-- so these access functions should only be referenced for the class of
267-- entities in which they are defined as being present. Flags are not
268-- overlapped in this way, but nevertheless as a matter of style and
269-- abstraction (which may or may not be checked by assertions in the
270-- body), this restriction should be observed for flag fields as well.
70482933
RK
271
272-- Note: certain of the attributes on types apply only to base types, and
273-- are so noted by the notation [base type only]. These are cases where the
274-- attribute of any subtype is the same as the attribute of the base type.
275-- The attribute can be referenced on a subtype (and automatically retrieves
07fc65c4
GB
276-- the value from the base type). However, it is an error to try to set the
277-- attribute on other than the base type, and if assertions are enabled,
278-- an attempt to set the attribute on a subtype will raise an assert error.
70482933 279
21d27997 280-- Other attributes are noted as applying to the [implementation base type
64ac53f4 281-- only]. These are representation attributes which must always apply to a
21d27997 282-- full non-private type, and where the attributes are always on the full
91669e7e 283-- type. The attribute can be referenced on a subtype (and automatically
2eda24e9 284-- retrieves the value from the implementation base type). However, it is an
21d27997 285-- error to try to set the attribute on other than the implementation base
a7cadd18
BD
286-- type.
287
288-- Other attributes are noted as applying to the [root type only]. The
289-- attribute can be referenced on a subtype (and automatically retrieves the
290-- value from the root type). However, it is an error to try to set the
291-- attribute on other than the root type.
292
293-- The definitive definition of what is [... type only] is in Gen_Entities.
294-- See calls to Sm passing Base_Type_Only, Impl_Base_Type_Only, or
295-- Root_Type_Only.
70482933 296
a7cadd18 297-- Abstract_States
cf6956bb
AC
298-- Defined for E_Package entities. Contains a list of all the abstract
299-- states declared by the related package.
300
a7cadd18 301-- Accept_Address
30ebb114 302-- Defined in entries. If an accept has a statement sequence, then an
70482933
RK
303-- address variable is created, which is used to hold the address of the
304-- parameters, as passed by the runtime. Accept_Address holds an element
305-- list which represents a stack of entities for these address variables.
306-- The current entry is the top of the stack, which is the last element
307-- on the list. A stack is required to handle the case of nested select
308-- statements referencing the same entry.
309
a7cadd18 310-- Access_Disp_Table [implementation base type only]
30ebb114 311-- Defined in E_Record_Type and E_Record_Subtype entities. Set in tagged
0d53d36b
AC
312-- types to point to their dispatch tables. The first two entities are
313-- associated with the primary dispatch table: 1) primary dispatch table
314-- with user-defined primitives 2) primary dispatch table with predefined
315-- primitives. For each interface type covered by the tagged type we also
316-- have: 3) secondary dispatch table with thunks of primitives covering
317-- user-defined interface primitives, 4) secondary dispatch table with
318-- thunks of predefined primitives, 5) secondary dispatch table with user
319-- defined primitives, and 6) secondary dispatch table with predefined
320-- primitives. The last entity of this list is an access type declaration
321-- used to expand dispatching calls through the primary dispatch table.
7c0c194b 322-- For an untagged record, contains No_Elist.
3fd9f17c 323
a7cadd18 324-- Access_Disp_Table_Elab_Flag [implementation base type only]
fe683ef6 325-- Defined in E_Record_Type and E_Record_Subtype entities. Set in tagged
83b77c5c
AC
326-- types whose dispatch table elaboration must be completed at run time
327-- by the IP routine to point to its pending elaboration flag entity.
328-- This flag is needed when the elaboration of the dispatch table relies
329-- on attribute 'Position applied to an object of the type; it is used by
fe683ef6
AC
330-- the IP routine to avoid performing this elaboration twice.
331
a7cadd18 332-- Access_Subprogram_Wrapper
dc419b9f
ES
333-- Entity created for access_to_subprogram types that have pre/post
334-- conditions. Wrapper subprogram is created when analyzing corresponding
335-- aspect, and inherits said aspects. Body of subprogram includes code
336-- to check contracts, and a direct call to the designated subprogram.
337-- The body is part of the freeze actions for the type.
338-- The Subprogram_Type created for the Access_To_Subprogram carries the
339-- Access_Subprogram_Wrapper for use in the expansion of indirect calls.
340
a7cadd18 341-- Activation_Record_Component
54e33e5f
ES
342-- Defined for E_Variable, E_Constant, E_Loop_Parameter, and formal
343-- parameter entities. Used in Opt.Unnest_Subprogram_Mode, in which case
344-- a reference to an uplevel entity produces a corresponding component
345-- in the generated ARECnT activation record (Exp_Unst for details).
3830827c 346
a7cadd18 347-- Actual_Subtype
30ebb114 348-- Defined in variables, constants, and formal parameters. This is the
70482933
RK
349-- subtype imposed by the value of the object, as opposed to its nominal
350-- subtype, which is imposed by the declaration. The actual subtype
351-- differs from the nominal one when the latter is indefinite (as in the
352-- case of an unconstrained formal parameter, or a variable declared
353-- with an unconstrained type and an initial value). The nominal subtype
354-- is the Etype entry for the entity. The Actual_Subtype field is set
355-- only if the actual subtype differs from the nominal subtype. If the
356-- actual and nominal subtypes are the same, then the Actual_Subtype
357-- field is Empty, and Etype indicates both types.
980f237d 358--
70482933
RK
359-- For objects, the Actual_Subtype is set only if this is a discriminated
360-- type. For arrays, the bounds of the expression are obtained and the
ea588d41
EB
361-- Etype of the object is directly the constrained subtype, except in the
362-- case of a return object that lives on the secondary stack where Etype
363-- is the nominal unconstrained subtype. This is rather irregular and the
364-- semantic checks that depend on the nominal subtype being unconstrained
365-- use flag Is_Constr_Subt_For_U_Nominal(qv).
70482933 366
70482933
RK
367-- Address_Clause (synthesized)
368-- Applies to entries, objects and subprograms. Set if an address clause
369-- is present which references the object or subprogram and points to
370-- the N_Attribute_Definition_Clause node. Empty if no Address clause.
371-- The expression in the address clause is always a constant that is
372-- defined before the entity to which the address clause applies.
28bc3323 373-- Note: The backend references this field in E_Task_Type entities???
70482933 374
a7cadd18 375-- Address_Taken
30ebb114 376-- Defined in all entities. Set if the Address or Unrestricted_Access
70482933 377-- attribute is applied directly to the entity, i.e. the entity is the
7e4680c1
EB
378-- entity of the prefix of the attribute reference. Also set if the
379-- entity is the second argument of an Asm_Input or Asm_Output attribute,
2168d7cc
AC
380-- as the construct may entail taking its address. And also set if the
381-- entity is a subprogram and the Access or Unchecked_Access attribute is
382-- applied. Used by the backend to make sure that the address can be
383-- meaningfully taken, and also in the case of subprograms to control
384-- output of certain warnings.
70482933 385
5087048c 386-- Aft_Value (synthesized)
2015a575
EB
387-- Applies to fixed-point types and subtypes. This yields the value of
388-- the Aft attribute for the type, i.e. the number of decimal digits
389-- needed after the decimal point to accommodate the delta of the type,
390-- unless the delta is greater than 0.1, in which case it is 1.
5087048c 391
a7cadd18 392-- Alias
30ebb114 393-- Defined in overloadable entities (literals, subprograms, entries) and
6e443c90 394-- subprograms that cover a primitive operation of an abstract interface
ce2b6ba5
JM
395-- (that is, subprograms with the Interface_Alias attribute). In case of
396-- overloaded entities it points to the parent subprogram of a derived
397-- subprogram. In case of abstract interface subprograms it points to the
398-- subprogram that covers the abstract interface primitive. Also used for
d994a6e2
RD
399-- a subprogram renaming, where it points to the renamed subprogram. For
400-- an inherited operation (of a type extension) that is overridden in a
401-- private part, the Alias is the overriding operation. In this fashion a
402-- call from outside the package ends up executing the new body even if
403-- non-dispatching, and a call from inside calls the overriding operation
404-- because it hides the implicit one. Alias is always empty for entries.
70482933 405
a7cadd18 406-- Alignment
30ebb114 407-- Defined in entities for types and also in constants, variables
0a36105d
JM
408-- (including exceptions where it refers to the static data allocated for
409-- an exception), loop parameters, and formal parameters. This indicates
410-- the desired alignment for a type, or the actual alignment for an
411-- object. A value of zero (Uint_0) indicates that the alignment has not
412-- been set yet. The alignment can be set by an explicit alignment
413-- clause, or set by the front-end in package Layout, or set by the
28bc3323 414-- back-end as part of the back-end back-annotation process. The
30ebb114 415-- alignment field is also defined in E_Exception entities, but there it
0a36105d 416-- is used only by the back-end for back annotation.
70482933
RK
417
418-- Alignment_Clause (synthesized)
ba673907 419-- Applies to all entities for types and objects. If an alignment
70482933
RK
420-- attribute definition clause is present for the entity, then this
421-- function returns the N_Attribute_Definition clause that specifies the
422-- alignment. If no alignment clause applies to the type, then the call
423-- to this function returns Empty. Note that the call can return a
424-- non-Empty value even if Has_Alignment_Clause is not set (happens with
425-- subtype and derived type declarations). Note also that a record
426-- definition clause with an (obsolescent) mod clause is converted
427-- into an attribute definition clause for this purpose.
428
a7cadd18 429-- Anonymous_Designated_Type
5b42c035 430-- Defined in variables which represent anonymous finalization masters.
c9d2e84b 431-- Contains the designated type which is being serviced by the master.
5b42c035 432
a7cadd18 433-- Anonymous_Masters
5b42c035
AC
434-- Defined in packages, subprograms, and subprogram bodies. Contains a
435-- list of anonymous finalization masters declared within the related
436-- unit. The list acts as a mapping between a master and a designated
437-- type.
57ae790f 438
a7cadd18 439-- Anonymous_Object
75b87c16
AC
440-- Present in protected and task type entities. Contains the entity of
441-- the anonymous object created for a single protected or task type.
442
a7cadd18 443-- Associated_Entity
caf07df9
AC
444-- Defined in all entities. This field is similar to Associated_Node, but
445-- applied to entities. The attribute links an entity from the generic
446-- template with its corresponding entity in the analyzed generic copy.
447-- The global references mechanism relies on the Associated_Entity to
448-- infer the context.
449
a7cadd18 450-- Associated_Formal_Package
30ebb114 451-- Defined in packages that are the actuals of formal_packages. Points
70482933
RK
452-- to the entity in the declaration for the formal package.
453
a7cadd18 454-- Associated_Node_For_Itype
30ebb114 455-- Defined in all type and subtype entities. Set non-Empty only for
70482933
RK
456-- Itypes. Set to point to the associated node for the Itype, i.e.
457-- the node whose elaboration generated the Itype. This is used for
ba673907
JM
458-- copying trees, to determine whether or not to copy an Itype, and
459-- also for accessibility checks on anonymous access types. This
460-- node is typically an object declaration, component declaration,
f9105bfa
AC
461-- type or subtype declaration.
462
463-- For an access discriminant in a type declaration, the associated_
464-- node_for_itype is the corresponding discriminant specification.
465
466-- For an access parameter it is the enclosing subprogram declaration.
467
468-- For an access_to_protected_subprogram parameter it is the declaration
469-- of the corresponding formal parameter.
e42bcfa3
AC
470--
471-- Itypes have no explicit declaration, and therefore are not attached to
472-- the tree: their Parent field is always empty. The Associated_Node_For_
473-- Itype is the only way to determine the construct that leads to the
474-- creation of a given itype entity.
70482933 475
a7cadd18 476-- Associated_Storage_Pool [root type only]
30ebb114 477-- Defined in simple and general access type entities. References the
70482933 478-- storage pool to be used for the corresponding collection. A value of
30ebb114 479-- Empty means that the default pool is to be used. This is defined
07fc65c4
GB
480-- only in the root type, since derived types must have the same pool
481-- as the parent type.
70482933 482
a7cadd18 483-- Barrier_Function
30ebb114 484-- Defined in protected entries and entry families. This is the
70482933
RK
485-- subprogram declaration for the body of the function that returns
486-- the value of the entry barrier.
487
488-- Base_Type (synthesized)
a01b9df6
AC
489-- Applies to all type and subtype entities. Returns the base type of a
490-- type or subtype. The base type of a type is the type itself. The base
491-- type of a subtype is the type that it constrains (which is always
492-- a type entity, not some other subtype). Note that in the case of a
493-- subtype of a private type, it is possible for the base type attribute
494-- to return a private type, even if the subtype to which it applies is
495-- non-private. See also Implementation_Base_Type. Note: it is allowed to
496-- apply Base_Type to other than a type, in which case it simply returns
497-- the entity unchanged.
70482933 498
a7cadd18 499-- Block_Node
30ebb114 500-- Defined in block entities. Points to the identifier in the
57568d91 501-- Block_Statement itself. Used when retrieving the block construct
e8bb6ff9 502-- for finalization purposes, the block entity has an implicit label
57568d91 503-- declaration in the enclosing declarative part, and has otherwise
4ba603e2 504-- no direct connection in the tree with the block statement. The
f3d0f304 505-- link is to the identifier (which is an occurrence of the entity)
57568d91
ES
506-- and not to the block_statement itself, because the statement may
507-- be rewritten, e.g. in the process of removing dead code.
70482933 508
a7cadd18 509-- Body_Entity
30ebb114 510-- Defined in package and generic package entities, points to the
c84700e7 511-- corresponding package body entity if one is present.
70482933 512
a7cadd18 513-- Body_Needed_For_SAL
30ebb114 514-- Defined in package and subprogram entities that are compilation
fbf5a39b
AC
515-- units. Indicates that the source for the body must be included
516-- when the unit is part of a standalone library.
517
a7cadd18 518-- Body_Needed_For_Inlining
b03d3f73
AC
519-- Defined in package entities that are compilation units. Used to
520-- determine whether the body unit needs to be compiled when the
521-- package declaration appears in the list of units to inline. A body
522-- is needed for inline processing if the unit declaration contains
523-- functions that carry pragma Inline or Inline_Always, or if it
524-- contains a generic unit that requires a body.
525--
a7cadd18 526-- Body_References
5627964c
AC
527-- Defined in abstract state entities. Contains an element list of
528-- references (identifiers) that appear in a package body whose spec
529-- defines the related state. If the body refines the said state, all
530-- references on this list are illegal due to the visible refinement.
8a7c0400 531
a7cadd18 532-- BIP_Initialization_Call
8c7ff9a0
AC
533-- Defined in constants and variables whose corresponding declaration
534-- is wrapped in a transient block and the inital value is provided by
535-- a build-in-place function call. Contains the relocated build-in-place
536-- call after the expansion has decoupled the call from the object. This
537-- attribute is used by the finalization machinery to insert cleanup code
937e9676 538-- for all additional transient objects found in the transient block.
8c7ff9a0 539
a7cadd18 540-- C_Pass_By_Copy [implementation base type only]
30ebb114 541-- Defined in record types. Set if a pragma Convention for the record
70482933
RK
542-- type specifies convention C_Pass_By_Copy. This convention name is
543-- treated as identical in all respects to convention C, except that
544-- if it is specified for a record type, then the C_Pass_By_Copy flag
545-- is set, and if a foreign convention subprogram has a formal of the
546-- corresponding type, then the parameter passing mechanism will be
547-- set to By_Copy (unless specifically overridden by an Import or
548-- Export pragma).
549
a7cadd18 550-- Can_Never_Be_Null
149604e4
RD
551-- This flag is defined in all entities. It is set in an object which can
552-- never have a null value. Set for constant access values initialized to
553-- a non-null value. This is also set for all access parameters in Ada 83
554-- and Ada 95 modes, and for access parameters that explicitly exclude
ead7594f 555-- null in Ada 2005 mode.
0a36105d
JM
556--
557-- This is used to avoid unnecessary resetting of the Is_Known_Non_Null
558-- flag for such entities. In Ada 2005 mode, this is also used when
559-- determining subtype conformance of subprogram profiles to ensure
560-- that two formals have the same null-exclusion status.
561--
149604e4
RD
562-- This is also set on some access types, e.g. the Etype of the anonymous
563-- access type of a controlling formal.
fbf5a39b 564
a7cadd18 565-- Can_Use_Internal_Rep [base type only]
30ebb114 566-- Defined in Access_Subprogram_Kind nodes. This flag is set by the
28bc3323 567-- front end and used by the backend. False means that the backend
df3e68b1
HK
568-- must represent the type in the same way as Convention-C types (and
569-- other foreign-convention types). On many targets, this means that
28bc3323
AC
570-- the backend will use dynamically generated trampolines for nested
571-- subprograms. True means that the backend can represent the type in
df3e68b1 572-- some internal way. On the aforementioned targets, this means that the
28bc3323 573-- backend will not use dynamically generated trampolines. This flag
df3e68b1
HK
574-- must be False if Has_Foreign_Convention is True; otherwise, the front
575-- end is free to set the policy.
576--
577-- Setting this False in all cases corresponds to the traditional back
578-- end strategy, where all access-to-subprogram types are represented the
ca1ffed0 579-- same way, independent of the Convention. For further details, see also
df3e68b1
HK
580-- Always_Compatible_Rep in Targparm.
581--
582-- Efficiency note: On targets that use dynamically generated
583-- trampolines, False generally favors efficiency of top-level
584-- subprograms, whereas True generally favors efficiency of nested
585-- ones. On other targets, this flag has little or no effect on
586-- efficiency. The front end should take this into account. In
ca1ffed0
AC
587-- particular, pragma Favor_Top_Level gives a hint that the flag
588-- should be False.
df3e68b1
HK
589--
590-- Note: We considered using Convention-C for this purpose, but we need
ca1ffed0 591-- this separate flag, because Convention-C implies that in the case of
df3e68b1
HK
592-- P'[Unrestricted_]Access, P also have convention C. Sometimes we want
593-- to have Can_Use_Internal_Rep False for an access type, but allow P to
594-- have convention Ada.
595
a7cadd18 596-- Chars
30ebb114 597-- Defined in all entities. This field contains an entry into the names
70482933
RK
598-- table that has the character string of the identifier, character
599-- literal or operator symbol. See Namet for further details. Note that
600-- throughout the processing of the front end, this name is the simple
28bc3323
AC
601-- unqualified name. However, just before the backend is called, a call
602-- is made to Qualify_All_Entity_Names. This causes entity names to be
603-- qualified using the encoding described in exp_dbug.ads, and from that
604-- point (including post backend steps, e.g. cross-reference generation),
605-- the entities will contain the encoded qualified names.
70482933 606
a7cadd18 607-- Checks_May_Be_Suppressed
30ebb114 608-- Defined in all entities. Set if a pragma Suppress or Unsuppress
c7c1d59b
MP
609-- mentions the entity specifically in the second argument. If this flag
610-- is set the global and local suppress stacks must be consulted to
611-- determine if there actually is an active Suppress or Unsuppress pragma
612-- that applies to the entity.
fbf5a39b 613
475e1d24
JM
614-- Class_Postconditions
615-- Defined on subprogram entities. Set if the subprogram has class-wide
616-- postconditions. Denotes the (and-then) expression built by merging
617-- inherited class-wide postconditions with its own class-wide
618-- postconditions.
619
620-- Class_Preconditions
621-- Defined on subprogram entities. Set if the subprogram has class-wide
622-- preconditions. Denotes the (or-else) expression built by merging
623-- inherited class-wide preconditions with its own class-wide
624-- preconditions.
625
626-- Class_Preconditions_Subprogram
627-- Defined on subprogram entities. Set on subprogram helpers and also on
628-- the indirect-call wrapper internally built for subprograms that have
629-- class-wide preconditions. References the subprogram that has the
630-- class-wide preconditions.
635ffc52 631
a7cadd18 632-- Class_Wide_Type
30ebb114 633-- Defined in all type entities. For a tagged type or subtype, returns
1bf773bb 634-- the corresponding implicitly declared class-wide type. For a
7c0c194b 635-- class-wide type, returns itself. Set to Empty for untagged types.
70482933 636
a7cadd18 637-- Cloned_Subtype
30ebb114 638-- Defined in E_Record_Subtype and E_Class_Wide_Subtype entities.
70482933
RK
639-- Each such entity can either have a Discriminant_Constraint, in
640-- which case it represents a distinct type from the base type (and
76fc4a85 641-- will have a list of components and discriminants in the list headed by
70482933
RK
642-- First_Entity) or else no such constraint, in which case it will be a
643-- copy of the base type.
644--
645-- o Each element of the list in First_Entity is copied from the base
646-- type; in that case, this field is Empty.
647--
648-- o The list in First_Entity is shared with the base type; in that
649-- case, this field points to that entity.
650--
651-- A record or classwide subtype may also be a copy of some other
652-- subtype and share the entities in the First_Entity with that subtype.
653-- In that case, this field points to that subtype.
654--
655-- For E_Class_Wide_Subtype, the presence of Equivalent_Type overrides
31fde973
GD
656-- this field. Note that this field ONLY appears in subtype entities, not
657-- in type entities, it is not defined, and it is an error to reference
70482933
RK
658-- Cloned_Subtype in an E_Record_Type or E_Class_Wide_Type entity.
659
660-- Comes_From_Source
661-- This flag appears on all nodes, including entities, and indicates
662-- that the node was created by the scanner or parser from the original
663-- source. Thus for entities, it indicates that the entity is defined
664-- in the original source program.
665
666-- Component_Alignment (special field) [base type only]
30ebb114 667-- Defined in array and record entities. Contains a value of type
70482933
RK
668-- Component_Alignment_Kind indicating the alignment of components.
669-- Set to Calign_Default normally, but can be overridden by use of
670-- the Component_Alignment pragma. Note: this field is currently
671-- stored in a non-standard way, see body for details.
672
a7cadd18 673-- Component_Bit_Offset
354ae449
AC
674-- Defined in record components (E_Component, E_Discriminant). First
675-- bit position of given component, computed from the first bit and
676-- position values given in the component clause. A value of No_Uint
677-- means that the value is not yet known. The value can be set by the
678-- appearance of an explicit component clause in a record representation
679-- clause, or it can be set by the front-end in package Layout, or it can
680-- be set by the backend. By the time backend processing is completed,
70482933
RK
681-- this field is always set. A negative value is used to represent
682-- a value which is not known at compile time, and must be computed
683-- at run-time (this happens if fields of a record have variable
b9ec951f 684-- lengths). See package Repinfo for details of these values.
70482933 685--
ae65d635
AC
686-- Note: Component_Bit_Offset is redundant with respect to the fields
687-- Normalized_First_Bit and Normalized_Position, and could in principle
688-- be eliminated, but it is convenient in several situations, including
28bc3323 689-- use in the backend, to have this redundant field.
70482933 690
a7cadd18 691-- Component_Clause
30ebb114 692-- Defined in record components and discriminants. If a record
5132708f
RD
693-- representation clause is present for the corresponding record type a
694-- that specifies a position for the component, then the Component_Clause
695-- field of the E_Component entity points to the N_Component_Clause node.
696-- Set to Empty if no record representation clause was present, or if
697-- there was no specification for this component.
70482933 698
a7cadd18 699-- Component_Size [implementation base type only]
30ebb114 700-- Defined in array types. It contains the component size value for
82c80734 701-- the array. A value of No_Uint means that the value is not yet set.
70482933
RK
702-- The value can be set by the use of a component size clause, or
703-- by the front end in package Layout, or by the backend. A negative
704-- value is used to represent a value which is not known at compile
705-- time, and must be computed at run-time (this happens if the type
b9ec951f
BD
706-- of the component has a variable length size). See package Repinfo
707-- for details of these values. Component_Size can also be negative in
708-- an illegal program that says e.g. "for T'Component_Size use -8;".
70482933 709
a7cadd18 710-- Component_Type [implementation base type only]
30ebb114 711-- Defined in array types and string types. References component type.
70482933 712
a7cadd18 713-- Contains_Ignored_Ghost_Code
8636f52f
HK
714-- Defined in blocks, packages and their bodies, subprograms and their
715-- bodies. Set if the entity contains any ignored Ghost code in the form
716-- of declaration, procedure call, assignment statement or pragma.
717
a7cadd18 718-- Contract
f99ff327 719-- Defined in constant, entry, entry family, operator, [generic] package,
4127ebec
SB
720-- package body, protected unit, [generic] subprogram, subprogram body,
721-- variable, task unit, and type entities. Points to the contract of the
722-- entity, holding various assertion items and data classifiers.
02886c2e 723
a7cadd18 724-- Contract_Wrapper
8a0183fd
HK
725-- Defined in entry and entry family entities. Set only when the entry
726-- [family] has contract cases, preconditions, and/or postconditions.
727-- Contains the entity of a wrapper procedure which encapsulates the
728-- original entry and implements precondition/postcondition semantics.
729
a7cadd18 730-- Corresponding_Concurrent_Type
30ebb114 731-- Defined in record types that are constructed by the expander to
70482933 732-- represent task and protected types (Is_Concurrent_Record_Type flag
124092ee 733-- set). Points to the entity for the corresponding task type or the
70482933
RK
734-- protected type.
735
a7cadd18 736-- Corresponding_Discriminant
30ebb114 737-- Defined in discriminants of a derived type, when the discriminant is
70482933
RK
738-- used to constrain a discriminant of the parent type. Points to the
739-- corresponding discriminant in the parent type. Otherwise it is Empty.
740
a7cadd18 741-- Corresponding_Equality
30ebb114 742-- Defined in function entities for implicit inequality operators.
70482933
RK
743-- Denotes the explicit or derived equality operation that creates
744-- the implicit inequality. Note that this field is not present in
745-- other function entities, only in implicit inequality routines,
746-- where Comes_From_Source is always False.
747
a7cadd18 748-- Corresponding_Function
888be6b1
AC
749-- Defined on procedures internally built with an extra out parameter
750-- to return a constrained array type, when Modify_Tree_For_C is set.
751-- Denotes the function that returns the constrained array type for
752-- which this procedure was built.
753
a7cadd18 754-- Corresponding_Procedure
888be6b1
AC
755-- Defined on functions that return a constrained array type, when
756-- Modify_Tree_For_C is set. Denotes the internally built procedure
757-- with an extra out parameter created for it.
758
a7cadd18 759-- Corresponding_Record_Component
05dbb83f 760-- Defined in components of a derived untagged record type, including
81a0f4a3 761-- discriminants. For a regular component or a stored discriminant,
05dbb83f 762-- points to the corresponding component in the parent type. Set to
81a0f4a3 763-- Empty for a non-stored discriminant. It is used by the back end to
05dbb83f
AC
764-- ensure the layout of the derived type matches that of the parent
765-- type when there is no representation clause on the derived type.
766
a7cadd18 767-- Corresponding_Record_Type
30ebb114 768-- Defined in protected and task types and subtypes. References the
70482933
RK
769-- entity for the corresponding record type constructed by the expander
770-- (see Exp_Ch9). This type is used to represent values of the task type.
771
a7cadd18 772-- Corresponding_Remote_Type
30ebb114 773-- Defined in record types that describe the fat pointer structure for
308e6f3a 774-- Remote_Access_To_Subprogram types. References the original access
d67f5bbb 775-- to subprogram type.
70482933 776
a7cadd18 777-- CR_Discriminant
30ebb114 778-- Defined in discriminants of concurrent types. Denotes the homologous
6e443c90
RD
779-- discriminant of the corresponding record type. The CR_Discriminant is
780-- created at the same time as the discriminal, and used to replace
781-- occurrences of the discriminant within the type declaration.
70482933 782
a7cadd18 783-- Current_Use_Clause
30ebb114 784-- Defined in packages and in types. For packages, denotes the use
21d27997
RD
785-- package clause currently in scope that makes the package use_visible.
786-- For types, it denotes the use_type clause that makes the operators of
787-- the type visible. Used for more precise warning messages on redundant
788-- use clauses.
f4d379b8 789
a7cadd18 790-- Current_Value
30ebb114 791-- Defined in all object entities. Set in E_Variable, E_Constant, formal
6e443c90
RD
792-- parameters and E_Loop_Parameter entities if we have trackable current
793-- values. Set non-Empty if the (constant) current value of the variable
8e334288 794-- is known. This value is valid only for references from the same
6e443c90
RD
795-- sequential scope as the entity. The sequential scope of an entity
796-- includes the immediate scope and any contained scopes that are package
797-- specs, package bodies, blocks (at any nesting level) or statement
798-- sequences in IF or loop statements.
fbf5a39b 799--
6e443c90
RD
800-- Another related use of this field is to record information about the
801-- value obtained from an IF or WHILE statement condition. If the IF or
802-- ELSIF or WHILE condition has the form "NOT {,NOT] OBJ RELOP VAL ",
803-- or OBJ [AND [THEN]] expr, where OBJ refers to an entity with a
804-- Current_Value field, RELOP is one of the six relational operators, and
805-- VAL is a compile-time known value then the Current_Value field of OBJ
806-- points to the N_If_Statement, N_Elsif_Part, or N_Iteration_Scheme node
807-- of the relevant construct, and the Condition field of this can be
808-- consulted to give information about the value of OBJ. For more details
809-- on this usage, see the procedure Exp_Util.Get_Current_Value_Condition.
fbf5a39b 810
a7cadd18 811-- Debug_Info_Off
30ebb114 812-- Defined in all entities. Set if a pragma Suppress_Debug_Info applies
70482933 813-- to the entity, or if internal processing in the compiler determines
fbf5a39b
AC
814-- that suppression of debug information is desirable. Note that this
815-- flag is only for use by the front end as part of the processing for
28bc3323 816-- determining if Needs_Debug_Info should be set. The backend should
fbf5a39b 817-- always test Needs_Debug_Info, it should never test Debug_Info_Off.
70482933 818
a7cadd18 819-- Debug_Renaming_Link
4c8e94ab 820-- Used to link the variable associated with a debug renaming declaration
70482933
RK
821-- to the renamed entity. See Exp_Dbug.Debug_Renaming_Declaration for
822-- details of the use of this field.
823
824-- Declaration_Node (synthesized)
ea034236
AC
825-- Applies to all entities. Returns the tree node for the construct that
826-- declared the entity. Normally this is just the Parent of the entity.
827-- One exception arises with child units, where the parent of the entity
828-- is a selected component/defining program unit name. Another exception
b98e2969
AC
829-- is that if the entity is an incomplete type that has been completed or
830-- a private type, then we obtain the declaration node denoted by the
831-- full type, i.e. the full type declaration node. Also note that for
832-- subprograms, this returns the {function,procedure}_specification, not
c36774bc
BD
833-- the subprogram_declaration. If the parent of an Itype is a type or
834-- subtype declaration, we return the declaration node as for any other
835-- type. For other Itypes, we return Empty.
70482933 836
a7cadd18 837-- Default_Aspect_Component_Value [base type only]
30ebb114 838-- Defined in array types. Holds the static value specified in a
27fd9ad8
ES
839-- Default_Component_Value aspect specification for the array type,
840-- or inherited on derivation.
37da997b 841
a7cadd18 842-- Default_Aspect_Value [base type only]
30ebb114 843-- Defined in scalar types. Holds the static value specified in a
27fd9ad8
ES
844-- Default_Value aspect specification for the type, or inherited
845-- on derivation.
37da997b 846
a7cadd18 847-- Default_Expr_Function
30ebb114 848-- Defined in parameters. It holds the entity of the parameterless
70482933
RK
849-- function that is built to evaluate the default expression if it is
850-- more complex than a simple identifier or literal. For the latter
851-- simple cases or if there is no default value, this field is Empty.
852
a7cadd18 853-- Default_Expressions_Processed
70482933
RK
854-- A flag in subprograms (functions, operators, procedures) and in
855-- entries and entry families used to indicate that default expressions
856-- have been processed and to avoid multiple calls to process the
857-- default expressions (see Freeze.Process_Default_Expressions), which
858-- would not only waste time, but also generate false error messages.
859
a7cadd18 860-- Default_Value
30ebb114 861-- Defined in formal parameters. Points to the node representing the
70482933
RK
862-- expression for the default value for the parameter. Empty if the
863-- parameter has no default value (which is always the case for OUT
864-- and IN OUT parameters in the absence of errors).
865
a7cadd18 866-- Delay_Cleanups
30ebb114 867-- Defined in entities that have finalization lists (subprograms
70482933
RK
868-- blocks, and tasks). Set if there are pending generic body
869-- instantiations for the corresponding entity. If this flag is
870-- set, then generation of cleanup actions for the corresponding
871-- entity must be delayed, since the insertion of the generic body
872-- may affect cleanup generation (see Inline for further details).
873
a7cadd18 874-- Delay_Subprogram_Descriptors
30ebb114 875-- Defined in entities for which exception subprogram descriptors
70482933 876-- are generated (subprograms, package declarations and package
30ebb114 877-- bodies). Defined if there are pending generic body instantiations
70482933 878-- for the corresponding entity. If this flag is set, then generation
587af009 879-- of the subprogram descriptor for the corresponding entities must
70482933
RK
880-- be delayed, since the insertion of the generic body may add entries
881-- to the list of handlers.
882--
883-- Note: for subprograms, Delay_Subprogram_Descriptors is set if and
884-- only if Delay_Cleanups is set. But Delay_Cleanups can be set for a
885-- a block (in which case Delay_Subprogram_Descriptors is set for the
886-- containing subprogram). In addition Delay_Subprogram_Descriptors is
887-- set for a library level package declaration or body which contains
888-- delayed instantiations (in this case the descriptor refers to the
889-- enclosing elaboration procedure).
890
a7cadd18 891-- Delta_Value
30ebb114 892-- Defined in fixed and decimal types. Points to a universal real
70482933
RK
893-- that holds value of delta for the type, as given in the declaration
894-- or as inherited by a subtype or derived type.
895
a7cadd18 896-- Dependent_Instances
30ebb114 897-- Defined in packages that are instances. Holds list of instances
70482933
RK
898-- of inner generics. Used to place freeze nodes for those instances
899-- after that of the current one, i.e. after the corresponding generic
900-- bodies.
901
a7cadd18 902-- Depends_On_Private
30ebb114 903-- Defined in all type entities. Set if the type is private or if it
70482933
RK
904-- depends on a private type.
905
a7cadd18 906-- Derived_Type_Link
31fde973 907-- Defined in all type and subtype entities. Set in a base type if
ab01e614
AC
908-- a derived type declaration is encountered which derives from
909-- this base type or one of its subtypes, and there are already
910-- primitive operations declared. In this case, it references the
911-- entity for the type declared by the derived type declaration.
912-- For example:
913--
914-- type R is ...
915-- subtype RS is R ...
916-- ...
917-- type G is new RS ...
918--
919-- In this case, if primitive operations have been declared for R, at
920-- the point of declaration of G, then the Derived_Type_Link of R is set
cfedf3e5
SB
921-- to point to the entity for G. This is used to generate warnings and
922-- errors for rep clauses that appear later on for R, which might result
923-- in an unexpected (or illegal) implicit conversion operation.
ab01e614
AC
924--
925-- Note: if there is more than one such derived type, the link will point
cfedf3e5 926-- to the last one.
ab01e614 927
70482933 928-- Designated_Type (synthesized)
0c3985a9
AC
929-- Applies to access types. Returns the designated type. Differs from
930-- Directly_Designated_Type in that if the access type refers to an
931-- incomplete type, and the full type is available, then this full type
932-- is returned instead of the incomplete type.
70482933 933
f63d601b
HK
934-- DIC_Procedure (synthesized)
935-- Defined in all type entities. Set for a private type and its full view
936-- when the type is subject to pragma Default_Initial_Condition (DIC), or
937-- when the type inherits a DIC pragma from a parent type. Points to the
938-- entity of a procedure which takes a single argument of the given type
e51102b2 939-- and verifies the assertion expression of the DIC pragma at run time.
f63d601b
HK
940
941-- Note: the reason this is marked as a synthesized attribute is that the
942-- way this is stored is as an element of the Subprograms_For_Type field.
943
a7cadd18 944-- Digits_Value
30ebb114 945-- Defined in floating point types and subtypes and decimal types and
70482933
RK
946-- subtypes. Contains the Digits value specified in the declaration.
947
a7cadd18 948-- Direct_Primitive_Operations
30ebb114 949-- Defined in tagged types and subtypes (including synchronized types),
790b8752
YM
950-- in tagged private types, and in tagged incomplete types. Moreover, it
951-- is also defined for untagged types, both when Extensions_Allowed is
952-- True (-gnatX) to support the extension feature of prefixed calls for
953-- untagged types, and when Extensions_Allowed is False to get better
954-- error messages. This field is an element list of entities for
955-- primitive operations of the type. For incomplete types the list is
956-- always empty. In order to follow the C++ ABI, entities of primitives
957-- that come from source must be stored in this list in the order of
958-- their occurrence in the sources. When expansion is disabled, the
959-- corresponding record type of a synchronized type is not constructed.
960-- In that case, such types carry this attribute directly.
ef2a63ba 961
a7cadd18 962-- Directly_Designated_Type
30ebb114 963-- Defined in access types. This field points to the type that is
70482933
RK
964-- directly designated by the access type. In the case of an access
965-- type to an incomplete type, this field references the incomplete
ffb35bbf
ES
966-- type. Directly_Designated_Type is typically used in implementing the
967-- static semantics of the language; in implementing dynamic semantics,
968-- we typically want the full view of the designated type. The function
969-- Designated_Type obtains this full type in the case of access to an
970-- incomplete type.
70482933 971
a7cadd18 972-- Disable_Controlled [base type only]
0cb81445
PMR
973-- Present in all entities. Set for a controlled type subject to aspect
974-- Disable_Controlled which evaluates to True. This flag is taken into
975-- account in synthesized attribute Is_Controlled.
c8593453 976
a7cadd18 977-- Discard_Names
30ebb114 978-- Defined in types and exception entities. Set if pragma Discard_Names
70482933
RK
979-- applies to the entity. It is also set for declarative regions and
980-- package specs for which a Discard_Names pragma with zero arguments
981-- has been encountered. The purpose of setting this flag is to be able
982-- to set the Discard_Names attribute on enumeration types declared
fbf5a39b
AC
983-- after the pragma within the same declarative region. This flag is
984-- set to False if a Keep_Names pragma appears for an enumeration type.
70482933 985
a7cadd18 986-- Discriminal
30ebb114 987-- Defined in discriminants (Discriminant formal: GNAT's first
70482933 988-- coinage). The entity used as a formal parameter that corresponds
fbf5a39b
AC
989-- to a discriminant. See section "Handling of Discriminants" for
990-- full details of the use of discriminals.
70482933 991
a7cadd18 992-- Discriminal_Link
8398e82e
AC
993-- Defined in E_In_Parameter or E_Constant entities. For discriminals,
994-- points back to corresponding discriminant. For other entities, must
995-- remain Empty.
70482933 996
a7cadd18 997-- Discriminant_Checking_Func
30ebb114 998-- Defined in components. Points to the defining identifier of the
70482933
RK
999-- function built by the expander returns a Boolean indicating whether
1000-- the given record component exists for the current discriminant
1001-- values.
1002
a7cadd18 1003-- Discriminant_Constraint
30ebb114 1004-- Defined in entities whose Has_Discriminants flag is set (concurrent
70482933
RK
1005-- types, subtypes, record types and subtypes, private types and
1006-- subtypes, limited private types and subtypes and incomplete types).
1007-- It is an error to reference the Discriminant_Constraint field if
fbf5a39b 1008-- Has_Discriminants is False.
70482933
RK
1009--
1010-- If the Is_Constrained flag is set, Discriminant_Constraint points
1011-- to an element list containing the discriminant constraints in the
1012-- same order in which the discriminants are declared.
1013--
1014-- If the Is_Constrained flag is not set but the discriminants of the
1015-- unconstrained type have default initial values then this field
1016-- points to an element list giving these default initial values in
1017-- the same order in which the discriminants are declared. Note that
1018-- in this case the entity cannot be a tagged record type, because
1019-- discriminants in this case cannot have defaults.
1020--
1021-- If the entity is a tagged record implicit type, then this field is
1022-- inherited from the first subtype (so that the itype is subtype
1023-- conformant with its first subtype, which is needed when the first
1024-- subtype overrides primitive operations inherited by the implicit
1025-- base type).
1026--
1027-- In all other cases Discriminant_Constraint contains the empty
52afb186 1028-- Elist (i.e. it is initialized with a call to New_Elmt_List).
70482933 1029
a7cadd18 1030-- Discriminant_Default_Value
30ebb114 1031-- Defined in discriminants. Points to the node representing the
70482933
RK
1032-- expression for the default value of the discriminant. Set to
1033-- Empty if the discriminant has no default value.
1034
a7cadd18 1035-- Discriminant_Number
30ebb114 1036-- Defined in discriminants. Gives the ranking of a discriminant in
70482933 1037-- the list of discriminants of the type, i.e. a sequential integer
a4100e55 1038-- index starting at 1 and ranging up to number of discriminants.
70482933 1039
a7cadd18 1040-- Dispatch_Table_Wrappers [implementation base type only]
30ebb114 1041-- Defined in E_Record_Type and E_Record_Subtype entities. Set in library
0d53d36b
AC
1042-- level tagged type entities if we are generating statically allocated
1043-- dispatch tables. Points to the list of dispatch table wrappers
7c0c194b 1044-- associated with the tagged type. For an untagged record, contains
0d53d36b 1045-- No_Elist.
e18d6a15 1046
475e1d24
JM
1047-- Dynamic_Call_Helper
1048-- Defined on subprogram entities. Set if the subprogram has class-wide
1049-- preconditions. Denotes the helper that evaluates at run time the
1050-- class-wide preconditions performing dispatching calls.
1051
a7cadd18 1052-- DTC_Entity
30ebb114 1053-- Defined in function and procedure entities. Set to Empty unless
70482933 1054-- the subprogram is dispatching in which case it references the
0469274e
TQ
1055-- Dispatch Table pointer Component. For regular Ada tagged this, this
1056-- is the _Tag component. For CPP_Class types and their descendants,
1057-- this points to the component entity in the record that holds the
1058-- Vtable pointer for the Vtable containing the entry referencing the
1059-- subprogram.
70482933 1060
a7cadd18 1061-- DT_Entry_Count
30ebb114 1062-- Defined in E_Component entities. Only used for component marked
70482933
RK
1063-- Is_Tag. Store the number of entries in the Vtable (or Dispatch Table)
1064
a7cadd18 1065-- DT_Offset_To_Top_Func
30ebb114 1066-- Defined in E_Component entities. Only used for component marked
ba673907
JM
1067-- Is_Tag. If present it stores the Offset_To_Top function used to
1068-- provide this value in tagged types whose ancestor has discriminants.
1069
a7cadd18 1070-- DT_Position
30ebb114 1071-- Defined in function and procedure entities which are dispatching
70482933
RK
1072-- (should not be referenced without first checking that flag
1073-- Is_Dispatching_Operation is True). Contains the offset into
1074-- the Vtable for the entry that references the subprogram.
1075
1076-- Ekind (Ekind)
30ebb114 1077-- Defined in all entities. Contains a value of the enumeration type
70482933
RK
1078-- Entity_Kind declared in a subsequent section in this spec.
1079
a7cadd18 1080-- Elaborate_Body_Desirable
30ebb114 1081-- Defined in package entities. Set if the elaboration circuitry detects
6e443c90
RD
1082-- a case where there is a package body that modifies one or more visible
1083-- entities in the package spec and there is no explicit Elaborate_Body
1084-- pragma for the package. This information is passed on to the binder,
1085-- which attempts, but does not promise, to elaborate the body as close
1086-- to the spec as possible.
1087
a7cadd18 1088-- Elaboration_Entity
3f99a611
HK
1089-- Defined in entry, entry family, [generic] package, and subprogram
1090-- entities. This is a counter associated with the unit that is initially
1091-- set to zero, is incremented when an elaboration request for the unit
1092-- is made, and is decremented when a finalization request for the unit
824e9320
AC
1093-- is made. This is used for three purposes. First, it is used to
1094-- implement access before elaboration checks (the counter must be
1095-- non-zero to call a subprogram at elaboration time). Second, it is
1096-- used to guard against repeated execution of the elaboration code.
1097-- Third, it is used to ensure that the finalization code is executed
1098-- only after all clients have requested it.
70482933 1099--
824e9320 1100-- Note that we always allocate this counter, and set this field, but
70482933 1101-- we do not always actually use it. It is only used if it is needed
824e9320 1102-- for access before elaboration use (see Elaboration_Entity_Required
70482933
RK
1103-- flag) or if either the spec or the body has elaboration code. If
1104-- neither of these two conditions holds, then the entity is still
1105-- allocated (since we don't know early enough whether or not there
1106-- is elaboration code), but is simply not used for any purpose.
1107
a7cadd18 1108-- Elaboration_Entity_Required
3f99a611
HK
1109-- Defined in entry, entry family, [generic] package, and subprogram
1110-- entities. Set only if Elaboration_Entity is non-Empty to indicate that
1111-- the counter is required to be non-zero even if there is no other
824e9320
AC
1112-- elaboration code. This occurs when the Elaboration_Entity counter
1113-- is used for access before elaboration checks. If the counter is
1114-- only used to prevent multiple execution of the elaboration code,
1115-- then if there is no other elaboration code, obviously there is no
1116-- need to set the flag.
70482933 1117
a7cadd18 1118-- Encapsulating_State
75b87c16
AC
1119-- Defined in abstract state, constant and variable entities. Contains
1120-- the entity of an ancestor state or a single concurrent type whose
1121-- refinement utilizes this item as a constituent.
d7af5ea5 1122
a7cadd18 1123-- Enclosing_Scope
30ebb114 1124-- Defined in labels. Denotes the innermost enclosing construct that
70482933
RK
1125-- contains the label. Identical to the scope of the label, except for
1126-- labels declared in the body of an accept statement, in which case the
1127-- entry_name is the Enclosing_Scope. Used to validate goto's within
1128-- accept statements.
1129
a7cadd18 1130-- Entry_Accepted
30ebb114 1131-- Defined in E_Entry and E_Entry_Family entities. Set if there is
70482933
RK
1132-- at least one accept for this entry in the task body. Used to
1133-- generate warnings for missing accepts.
1134
a7cadd18 1135-- Entry_Bodies_Array
30ebb114 1136-- Defined in protected types for which Has_Entries is true.
70482933
RK
1137-- This is the defining identifier for the array of entry body
1138-- action procedures and barrier functions used by the runtime to
1139-- execute the user code associated with each entry.
1140
a7cadd18 1141-- Entry_Cancel_Parameter
30ebb114 1142-- Defined in blocks. This only applies to a block statement for
70482933
RK
1143-- which the Is_Asynchronous_Call_Block flag is set. It
1144-- contains the defining identifier of an object that must be
1145-- passed to the Cancel_Task_Entry_Call or Cancel_Protected_Entry_Call
1146-- call in the cleanup handler added to the block by
1147-- Exp_Ch7.Expand_Cleanup_Actions. This parameter is a Boolean
1148-- object for task entry calls and a Communications_Block object
1149-- in the case of protected entry calls. In both cases the objects
1150-- are declared in outer scopes to this block.
1151
a7cadd18 1152-- Entry_Component
30ebb114 1153-- Defined in formal parameters (in, in out and out parameters). Used
70482933
RK
1154-- only for formals of entries. References the corresponding component
1155-- of the entry parameter record for the entry.
1156
a7cadd18 1157-- Entry_Formal
30ebb114 1158-- Defined in components of the record built to correspond to entry
70482933
RK
1159-- parameters. This field points from the component to the formal. It
1160-- is the back pointer corresponding to Entry_Component.
1161
a7cadd18 1162-- Entry_Index_Constant
30ebb114 1163-- Defined in an entry index parameter. This is an identifier that
70482933
RK
1164-- eventually becomes the name of a constant representing the index
1165-- of the entry family member whose entry body is being executed. Used
1166-- to expand references to the entry index specification identifier.
1167
1168-- Entry_Index_Type (synthesized)
1169-- Applies to an entry family. Denotes Etype of the subtype indication
1170-- in the entry declaration. Used to resolve the index expression in an
1171-- accept statement for a member of the family, and in the prefix of
1172-- 'COUNT when it applies to a family member.
1173
a7cadd18 1174-- Entry_Max_Queue_Lengths_Array
442d1abb
AC
1175-- Defined in protected types for which Has_Entries is true. Contains the
1176-- defining identifier for the array of naturals used by the runtime to
1177-- limit the queue size of each entry individually.
1178
a7cadd18 1179-- Entry_Parameters_Type
30ebb114 1180-- Defined in entries. Points to the access-to-record type that is
70482933
RK
1181-- constructed by the expander to hold a reference to the parameter
1182-- values. This reference is manipulated (as an address) by the
1183-- tasking runtime. The designated record represents a packaging
1184-- up of the entry parameters (see Exp_Ch9.Expand_N_Entry_Declaration
1185-- for further details). Entry_Parameters_Type is Empty if the entry
1186-- has no parameters.
1187
a7cadd18 1188-- Enumeration_Pos
30ebb114 1189-- Defined in enumeration literals. Contains the position number
70482933
RK
1190-- corresponding to the value of the enumeration literal.
1191
a7cadd18 1192-- Enumeration_Rep
30ebb114 1193-- Defined in enumeration literals. Contains the representation that
70482933
RK
1194-- corresponds to the value of the enumeration literal. Note that
1195-- this is normally the same as Enumeration_Pos except in the presence
1196-- of representation clauses, where Pos will still represent the
1197-- position of the literal within the type and Rep will have be the
1198-- value given in the representation clause.
1199
a7cadd18 1200-- Enumeration_Rep_Expr
30ebb114 1201-- Defined in enumeration literals. Points to the expression in an
70482933
RK
1202-- associated enumeration rep clause that provides the representation
1203-- value for this literal. Empty if no enumeration rep clause for this
1204-- literal (or if rep clause does not have an entry for this literal,
1205-- an error situation). This is also used to catch duplicate entries
1206-- for the same literal.
1207
a7cadd18 1208-- Enum_Pos_To_Rep
79e267f9
EB
1209-- Defined in enumeration types, but not enumeration subtypes. Set to
1210-- Empty unless the enumeration type has a non-standard representation,
1211-- i.e. at least one literal has a representation value different from
1212-- its position value. In this case, the alternative is the following:
1213-- if the representation is not contiguous, then Enum_Pos_To_Rep is the
1214-- entity for an array constant built when the type is frozen that maps
1215-- Pos values to corresponding Rep values, whose index type is Natural
1216-- and whose component type is the enumeration type itself; or else, if
1217-- the representation is contiguous, then Enum_Pos_To_Rep is the entity
1218-- of the index type defined above.
70482933 1219
a7cadd18 1220-- Equivalent_Type
30ebb114 1221-- Defined in class wide types and subtypes, access to protected
21d27997 1222-- subprogram types, and in exception types. For a classwide type, it
70482933 1223-- is always Empty. For a class wide subtype, it points to an entity
28bc3323 1224-- created by the expander which gives the backend an understandable
70482933
RK
1225-- equivalent of the class subtype with a known size (given by an
1226-- initial value). See Exp_Util.Expand_Class_Wide_Subtype for further
21d27997 1227-- details. For E_Exception_Type, this points to the record containing
70482933 1228-- the data necessary to represent exceptions (for further details, see
31fde973 1229-- System.Standard_Library). For access to protected subprograms, it
70482933
RK
1230-- denotes a record that holds pointers to the operation and to the
1231-- protected object. For remote Access_To_Subprogram types, it denotes
1232-- the record that is the fat pointer representation of an RAST.
1233
a7cadd18 1234-- Esize
30ebb114 1235-- Defined in all types and subtypes, and also for components, constants,
0a36105d
JM
1236-- and variables, including exceptions where it refers to the static data
1237-- allocated for an exception. Contains the Object_Size of the type or of
1238-- the object. A value of zero indicates that the value is not yet known.
70482933
RK
1239--
1240-- For the case of components where a component clause is present, the
1241-- value is the value from the component clause, which must be non-
1242-- negative (but may be zero, which is acceptable for the case of
1243-- a type with only one possible value). It is also possible for Esize
30ebb114 1244-- of a component to be set without a component clause defined, which
70482933
RK
1245-- means that the component size is specified, but not the position.
1246-- See also RM_Size and the section on "Handling of Type'Size Values".
28bc3323
AC
1247-- During backend processing, the value is back annotated for all zero
1248-- values, so that after the call to the backend, the value is set.
70482933 1249
a7cadd18 1250-- Etype
30ebb114 1251-- Defined in all entities. Represents the type of the entity, which
70482933
RK
1252-- is itself another entity. For a type entity, points to the parent
1253-- type for a derived type, or if the type is not derived, points to
fbf5a39b 1254-- itself. For a subtype entity, Etype points to the base type. For
8c889ae4
AC
1255-- a class wide type, points to the corresponding specific type. For a
1256-- subprogram or subprogram type, Etype has the return type of a function
e4494292
RD
1257-- or is set to Standard_Void_Type to represent a procedure. The Etype
1258-- field of a package is also set to Standard_Void_Type.
fab2daeb
AC
1259--
1260-- Note one obscure case: for pragma Default_Storage_Pool (null), the
1261-- Etype of the N_Null node is Empty.
70482933 1262
a7cadd18 1263-- Extra_Accessibility
30ebb114 1264-- Defined in formal parameters in the non-generic case. Normally Empty,
b8a93198
AC
1265-- but if expansion is active, and a parameter is one for which a
1266-- dynamic accessibility check is required, then an extra formal of type
ce0bead3
HK
1267-- Natural is created (see description of field Extra_Formal), and the
1268-- Extra_Accessibility field of the formal parameter points to the entity
30ebb114 1269-- for this extra formal. Also defined in variables when compiling
ce0bead3
HK
1270-- receiving stubs. In this case, a non Empty value means that this
1271-- variable's accessibility depth has been transmitted by the caller and
1272-- must be retrieved through the entity designed by this field instead of
1273-- being computed.
70482933 1274
a7cadd18 1275-- Extra_Accessibility_Of_Result
30ebb114 1276-- Defined in (non-generic) Function, Operator, and Subprogram_Type
b8a93198
AC
1277-- entities. Normally Empty, but if expansion is active, and a function
1278-- is one for which "the accessibility level of the result ... determined
63585f75
SB
1279-- by the point of call" (AI05-0234) is needed, then an extra formal of
1280-- subtype Natural is created (see description of field Extra_Formal),
1281-- and the Extra_Accessibility_Of_Result field of the function points to
1282-- the entity for this extra formal.
1283
a7cadd18 1284-- Extra_Constrained
30ebb114 1285-- Defined in formal parameters in the non-generic case. Normally Empty,
b8a93198 1286-- but if expansion is active and a parameter is one for which a dynamic
ce0bead3
HK
1287-- indication of its constrained status is required, then an extra formal
1288-- of type Boolean is created (see description of field Extra_Formal),
1289-- and the Extra_Constrained field of the formal parameter points to the
30ebb114 1290-- entity for this extra formal. Also defined in variables when compiling
ce0bead3
HK
1291-- receiving stubs. In this case, a non empty value means that this
1292-- variable's constrained status has been transmitted by the caller and
1293-- must be retrieved through the entity designed by this field instead of
1294-- being computed.
1295
a7cadd18 1296-- Extra_Formal
3830827c
AC
1297-- Defined in formal parameters in the non-generic case. Certain
1298-- parameters require extra implicit information to be passed (e.g. the
1299-- flag indicating if an unconstrained variant record argument is
1300-- constrained, and the accessibility level for access parameters). See
1301-- description of Extra_Constrained, Extra_Accessibility fields for
1302-- further details. Extra formal parameters are constructed to represent
1303-- these values, and chained to the end of the list of formals using the
1304-- Extra_Formal field (i.e. the Extra_Formal field of the last "real"
1305-- formal points to the first extra formal, and the Extra_Formal field of
1306-- each extra formal points to the next one, with Empty indicating the
58009744
AC
1307-- end of the list of extra formals). Another case of Extra_Formal arises
1308-- in connection with unnesting of subprograms, where the ARECnF formal
1309-- that represents an activation record pointer is an extra formal.
3830827c 1310
a7cadd18 1311-- Extra_Formals
e201023c
PMR
1312-- Applies to subprograms, subprogram types, entries, and entry
1313-- families. Returns first extra formal of the subprogram or entry.
1314-- Returns Empty if there are no extra formals.
3830827c 1315
a7cadd18 1316-- Finalization_Master [root type only]
30ebb114 1317-- Defined in access-to-controlled or access-to-class-wide types. The
d3f70b35
AC
1318-- field contains the entity of the finalization master which handles
1319-- dynamically allocated controlled objects referenced by the access
1320-- type. Empty for access-to-subprogram types. Empty for access types
1321-- whose designated type does not need finalization actions.
1322
a7cadd18 1323-- Finalize_Storage_Only [base type only]
30ebb114 1324-- Defined in all types. Set on direct controlled types to which a
70482933
RK
1325-- valid Finalize_Storage_Only pragma applies. This flag is also set on
1326-- composite types when they have at least one controlled component and
1327-- all their controlled components are Finalize_Storage_Only. It is also
1328-- inherited by type derivation except for direct controlled types where
1329-- the Finalize_Storage_Only pragma is required at each level of
1330-- derivation.
1331
a7cadd18 1332-- Finalizer
df3e68b1
HK
1333-- Applies to package declarations and bodies. Contains the entity of the
1334-- library-level program which finalizes all package-level controlled
1335-- objects.
1336
70482933 1337-- First_Component (synthesized)
aafc151a
AC
1338-- Applies to incomplete, private, protected, record and task types.
1339-- Returns the first component by following the chain of declared
1340-- entities for the type a component is found (one with an Ekind of
1341-- E_Component). The discriminants are skipped. If the record is null,
1342-- then Empty is returned.
f937473f
RD
1343
1344-- First_Component_Or_Discriminant (synthesized)
aafc151a
AC
1345-- Similar to First_Component, but discriminants are not skipped, so will
1346-- find the first discriminant if discriminants are present.
70482933 1347
a7cadd18 1348-- First_Entity
d2a1dcf7 1349-- Defined in all entities that act as scopes to which a list of
51e8f412
BD
1350-- associated entities is attached, and also in all [sub]types. Some
1351-- entities are both; for example E_Record_Type acts as a scope and
1352-- is a type. [Sub]types that do not act as scopes (e.g. scalars) are
1353-- included to make it more convenient to Mutate_Entity between type
1354-- kinds. Points to a list of associated entities linked through the
1355-- Next_Entity field with Empty marking end-of-list.
d2a1dcf7 1356-- See also Last_Entity.
70482933 1357
a7cadd18 1358-- First_Exit_Statement
30ebb114 1359-- Defined in E_Loop entity. The exit statements for a loop are chained
308e6f3a 1360-- (in reverse order of appearance) using this field to point to the
51bf9bdf
AC
1361-- first entry in the chain (last exit statement in the loop). The
1362-- entries are chained through the Next_Exit_Statement field of the
1363-- N_Exit_Statement node with Empty marking the end of the list.
1364
70482933 1365-- First_Formal (synthesized)
3830827c 1366-- Applies to subprograms and subprogram types, and also to entries
70482933
RK
1367-- and entry families. Returns first formal of the subprogram or entry.
1368-- The formals are the first entities declared in a subprogram or in
1369-- a subprogram type (the designated type of an Access_To_Subprogram
1370-- definition) or in an entry.
1371
6e443c90
RD
1372-- First_Formal_With_Extras (synthesized)
1373-- Applies to subprograms and subprogram types, and also in entries
1374-- and entry families. Returns first formal of the subprogram or entry.
1375-- Returns Empty if there are no formals. The list returned includes
1376-- all the extra formals (see description of Extra_Formals field).
1377
a7cadd18 1378-- First_Index
f8c79ade
AC
1379-- Defined in array types and subtypes. By introducing implicit subtypes
1380-- for the index constraints, we have the same structure for constrained
1381-- and unconstrained arrays, subtype marks and discrete ranges are
1382-- both represented by a subtype. This function returns the tree node
1383-- corresponding to an occurrence of the first index (NOT the entity for
1384-- the type). Subsequent indices are obtained using Next_Index. Note that
1385-- this field is defined for the case of string literal subtypes, but is
1386-- always Empty.
70482933 1387
a7cadd18 1388-- First_Literal
30ebb114 1389-- Defined in all enumeration types, including character and boolean
70482933
RK
1390-- types. This field points to the first enumeration literal entity
1391-- for the type (i.e. it is set to First (Literals (N)) where N is
1392-- the enumeration type definition node. A special case occurs with
1393-- standard character and wide character types, where this field is
1394-- Empty, since there are no enumeration literal lists in these cases.
fbf5a39b
AC
1395-- Note that this field is set in enumeration subtypes, but it still
1396-- points to the first literal of the base type in this case.
70482933 1397
a7cadd18 1398-- First_Private_Entity
30ebb114 1399-- Defined in all entities containing private parts (packages, protected
ce0bead3
HK
1400-- types and subtypes, task types and subtypes). The entities on the
1401-- entity chain are in order of declaration, so the entries for private
1402-- entities are at the end of the chain. This field points to the first
1403-- entity for the private part. It is Empty if there are no entities
1404-- declared in the private part or if there is no private part.
70482933 1405
a7cadd18 1406-- First_Rep_Item
30ebb114 1407-- Defined in all entities. If non-empty, points to a linked list of
70482933
RK
1408-- representation pragmas nodes and representation clause nodes that
1409-- apply to the entity, linked using Next_Rep_Item, with Empty marking
1410-- the end of the list. In the case of derived types and subtypes, the
60370fb1
AC
1411-- new entity inherits the chain at the point of declaration. This means
1412-- that it is possible to have multiple instances of the same kind of rep
1413-- item on the chain, in which case it is the first one that applies to
1414-- the entity.
70482933 1415--
ce0bead3
HK
1416-- Note: pragmas that can apply to more than one overloadable entity,
1417-- (Convention, Interface, Inline, Inline_Always, Import, Export,
1418-- External) are never present on this chain when they apply to
1419-- overloadable entities, since it is impossible for a given pragma
1420-- to be on more than one chain at a time.
1421--
70482933 1422-- For most representation items, the representation information is
ce0bead3
HK
1423-- reflected in other fields and flags in the entity. For example if a
1424-- record representation clause is present, the component entities
1425-- reflect the specified information. However, there are some items that
1426-- are only reflected in the chain. These include:
70482933 1427--
70482933
RK
1428-- Machine_Attribute pragma
1429-- Link_Alias pragma
2a1f6a1f
AC
1430-- Linker_Constructor pragma
1431-- Linker_Destructor pragma
70482933 1432-- Weak_External pragma
2a1f6a1f 1433-- Thread_Local_Storage pragma
70482933 1434--
60370fb1 1435-- If any of these items are present, then the flag Has_Gigi_Rep_Item is
28bc3323 1436-- set, indicating that the backend should search the chain.
70482933
RK
1437--
1438-- Other representation items are included in the chain so that error
1439-- messages can easily locate the relevant nodes for posting errors.
30ebb114 1440-- Note in particular that size clauses are defined only for this
70482933
RK
1441-- purpose, and should only be accessed if Has_Size_Clause is set.
1442
a7cadd18 1443-- Float_Rep [base type only]
30ebb114 1444-- Defined in floating-point entities. Contains a value of type
23c799b1
GB
1445-- Float_Rep_Kind. Together with the Digits_Value uniquely defines
1446-- the floating-point representation to be used.
1447
a7cadd18 1448-- Freeze_Node
30ebb114 1449-- Defined in all entities. If there is an associated freeze node for the
60370fb1
AC
1450-- entity, this field references this freeze node. If no freeze node is
1451-- associated with the entity, then this field is Empty. See package
1452-- Freeze for further details.
70482933 1453
a7cadd18 1454-- From_Limited_With
dc726757
HK
1455-- Defined in abtract states, package and type entities. Set to True when
1456-- the related entity is generated by the expansion of a limited with
1457-- clause. Such an entity is said to be a "shadow" - it acts as the
1458-- abstract view of a state or variable or as the incomplete view of a
1459-- type by inheriting relevant attributes from the said entity.
70482933 1460
a7cadd18 1461-- Full_View
30ebb114 1462-- Defined in all type and subtype entities and in deferred constants.
40f4dbbe
AC
1463-- References the entity for the corresponding full type or constant
1464-- declaration. For all types other than private and incomplete types,
1465-- this field always contains Empty. If an incomplete type E1 is
1466-- completed by a private type E2 whose full type declaration entity is
1467-- E3 then the full view of E1 is E2, and the full view of E2 is E3. See
1468-- also Underlying_Type.
70482933 1469
a7cadd18 1470-- Generic_Homonym
30ebb114 1471-- Defined in generic packages. The generic homonym is the entity of
fbf5a39b
AC
1472-- a renaming declaration inserted in every generic unit. It is used
1473-- to resolve the name of a local entity that is given by a qualified
1474-- name, when the generic entity itself is hidden by a local name.
1475
a7cadd18 1476-- Generic_Renamings
30ebb114 1477-- Defined in package and subprogram instances. Holds mapping that
70482933
RK
1478-- associates generic parameters with the corresponding instances, in
1479-- those cases where the instance is an entity.
1480
a7cadd18 1481-- Handler_Records
30ebb114 1482-- Defined in subprogram and package entities. Points to a list of
70482933
RK
1483-- identifiers referencing the handler record entities for the
1484-- corresponding unit.
1485
a7cadd18 1486-- Has_Aliased_Components [implementation base type only]
30ebb114 1487-- Defined in array type entities. Indicates that the component type
ed05b790
RD
1488-- of the array is aliased. Should this also be set for records to
1489-- indicate that at least one component is aliased (see processing in
1490-- Sem_Prag.Process_Atomic_Independent_Shared_Volatile???)
70482933 1491
a7cadd18 1492-- Has_Alignment_Clause
30ebb114 1493-- Defined in all type entities and objects. Indicates if an alignment
70482933
RK
1494-- clause has been given for the entity. If set, then Alignment_Clause
1495-- returns the N_Attribute_Definition node for the alignment attribute
1496-- definition clause. Note that it is possible for this flag to be False
1497-- even when Alignment_Clause returns non_Empty (this happens in the case
1498-- of derived type declarations).
1499
a7cadd18 1500-- Has_All_Calls_Remote
124092ee
AC
1501-- Defined in all library unit entities. Set if the library unit has an
1502-- All_Calls_Remote pragma. Note that such entities must also be RCI
1503-- entities, so the flag Is_Remote_Call_Interface will always be set if
1504-- this flag is set.
70482933 1505
a7cadd18 1506-- Has_Atomic_Components [implementation base type only]
30ebb114 1507-- Defined in all types and objects. Set only for an array type or
70482933
RK
1508-- an array object if a valid pragma Atomic_Components applies to the
1509-- type or object. Note that in the case of an object, this flag is
1510-- only set on the object if there was an explicit pragma for the
1511-- object. In other words, the proper test for whether an object has
1512-- atomic components is to see if either the object or its base type
1513-- has this flag set. Note that in the case of a type, the pragma will
1514-- be chained to the rep item chain of the first subtype in the usual
1515-- manner.
1516
1517-- Has_Attach_Handler (synthesized)
1518-- Applies to record types that are constructed by the expander to
1519-- represent protected types. Returns True if there is at least one
1520-- Attach_Handler pragma in the corresponding specification.
1521
a7cadd18 1522-- Has_Biased_Representation
30ebb114 1523-- Defined in discrete types (where it applies to the type'size value),
70482933
RK
1524-- and to objects (both stand-alone and components), where it applies to
1525-- the size of the object from a size or record component clause. In
1526-- all cases it indicates that the size in question is smaller than
1527-- would normally be required, but that the size requirement can be
1528-- satisfied by using a biased representation, in which stored values
1529-- have the low bound (Expr_Value (Type_Low_Bound (T)) subtracted to
1530-- reduce the required size. For example, a type with a range of 1..2
1531-- takes one bit, using 0 to represent 1 and 1 to represent 2.
1532--
ce0bead3
HK
1533-- Note that in the object and component cases, the flag is only set if
1534-- the type is unbiased, but the object specifies a smaller size than the
1535-- size of the type, forcing biased representation for the object, but
1536-- the subtype is still an unbiased type.
70482933 1537
a7cadd18 1538-- Has_Completion
30ebb114 1539-- Defined in all entities that require a completion (functions,
70482933 1540-- procedures, private types, limited private types, incomplete types,
5453d5bd
AC
1541-- constants and packages that require a body). The flag is set if the
1542-- completion has been encountered and analyzed.
70482933 1543
a7cadd18 1544-- Has_Completion_In_Body
30ebb114 1545-- Defined in all entities for types and subtypes. Set only in "Taft
6e443c90
RD
1546-- amendment types" (incomplete types whose full declaration appears in
1547-- the package body).
70482933 1548
a7cadd18 1549-- Has_Complex_Representation [implementation base type only]
8489c295
AC
1550-- Defined in record types. Set only for a base type to which a valid
1551-- pragma Complex_Representation applies.
70482933 1552
a7cadd18 1553-- Has_Component_Size_Clause [implementation base type only]
30ebb114
AC
1554-- Defined in all type entities. Set if a component size clause is
1555-- Defined for the given type. Note that this flag can be False even
70482933
RK
1556-- if Component_Size is non-zero (happens in the case of derived types).
1557
a7cadd18 1558-- Has_Constrained_Partial_View [base type only]
30ebb114 1559-- Defined in private type and their completions, when the private
edd63e9b
ES
1560-- type has no discriminants and the full view has discriminants with
1561-- defaults. In Ada 2005 heap-allocated objects of such types are not
1562-- constrained, and can change their discriminants with full assignment.
05c064c1 1563--
5af46aa9
AC
1564-- Ada 2012 has an additional rule (3.3. (23/10.3)) concerning objects
1565-- declared in a generic package body. Objects whose type is an untagged
1566-- generic formal private type are considered to have a constrained
1567-- partial view. The predicate Object_Type_Has_Constrained_Partial_View
1568-- in sem_aux is used to test for this case.
edd63e9b 1569
a7cadd18 1570-- Has_Contiguous_Rep
3c5fb4f4 1571-- Defined in enumeration types. Set if the type has a representation
fbf5a39b
AC
1572-- clause whose entries are successive integers.
1573
a7cadd18 1574-- Has_Controlled_Component [base type only]
30ebb114 1575-- Defined in all type and subtype entities. Set only for composite type
a01b9df6
AC
1576-- entities which contain a component that either is a controlled type,
1577-- or itself contains controlled component (i.e. either Is_Controlled or
1578-- Has_Controlled_Component is set for at least one component).
70482933 1579
a7cadd18 1580-- Has_Controlling_Result
02886c2e 1581-- Defined in E_Function entities. Set if the function is a primitive
89e037d0
EB
1582-- function of a tagged type which can dispatch on result. Also set on
1583-- secondary stack thunks built for such a primitive function.
02886c2e 1584
a7cadd18 1585-- Has_Convention_Pragma
124092ee
AC
1586-- Defined in all entities. Set for an entity for which a valid pragma
1587-- Convention, Import, or Export has been given. Used to prevent more
1588-- than one such pragma appearing for a given entity (RM B.1(45)).
70482933 1589
a7cadd18 1590-- Has_Default_Aspect [base type only]
e477d718
AC
1591-- Defined in entities for types and subtypes, set for scalar types with
1592-- a Default_Value aspect and array types with a Default_Component_Value
27fd9ad8
ES
1593-- aspect. If this flag is set, then a corresponding aspect specification
1594-- node will be present on the rep item chain for the entity. For a
1595-- derived type that inherits a default from its ancestor, the default
1596-- value is set, but it may be overridden by an aspect declaration on
e1d458b0 1597-- type derivation.
e477d718 1598
a7cadd18 1599-- Has_Delayed_Aspects
124092ee
AC
1600-- Defined in all entities. Set if the Rep_Item chain for the entity has
1601-- one or more N_Aspect_Definition nodes chained which are not to be
30ebb114
AC
1602-- evaluated till the freeze point. The aspect definition expression
1603-- clause has been preanalyzed to get visibility at the point of use,
1604-- but no other action has been taken.
c159409f 1605
a7cadd18 1606-- Has_Delayed_Freeze
30ebb114 1607-- Defined in all entities. Set to indicate that an explicit freeze
70482933
RK
1608-- node must be generated for the entity at its freezing point. See
1609-- separate section ("Delayed Freezing and Elaboration") for details.
1610
a7cadd18 1611-- Has_Delayed_Rep_Aspects
65fe0167 1612-- Defined in all types and subtypes. This flag is set if there is at
15e934bf
AC
1613-- least one aspect for a representation characteristic that has to be
1614-- delayed and is one of the characteristics that may be inherited by
1615-- types derived from this type if not overridden. If this flag is set,
1616-- then types derived from this type have May_Inherit_Delayed_Rep_Aspects
a2667f14 1617-- set, signalling that Freeze.Inherit_Delayed_Rep_Aspects must be called
15e934bf
AC
1618-- at the freeze point of the derived type.
1619
31fde973 1620-- Has_DIC (synthesized)
f63d601b
HK
1621-- Defined in all type entities. Set for a private type and its full view
1622-- when the type is subject to pragma Default_Initial_Condition (DIC), or
1623-- when the type inherits a DIC pragma from a parent type.
1624
a7cadd18 1625-- Has_Discriminants
30ebb114 1626-- Defined in all types and subtypes. For types that are allowed to have
70482933
RK
1627-- discriminants (record types and subtypes, task types and subtypes,
1628-- protected types and subtypes, private types, limited private types,
1629-- and incomplete types), indicates if the corresponding type or subtype
1630-- has a known discriminant part. Always false for all other types.
1631
a7cadd18 1632-- Has_Dispatch_Table
30ebb114 1633-- Defined in E_Record_Types that are tagged. Set to indicate that the
5d37ba92
ES
1634-- corresponding dispatch table is already built. This flag is used to
1635-- avoid duplicate construction of library level dispatch tables (because
1636-- the declaration of library level objects cause premature construction
1637-- of the table); otherwise the code that builds the table is added at
1638-- the end of the list of declarations of the package.
1639
a7cadd18 1640-- Has_Dynamic_Predicate_Aspect
aab45d22 1641-- Defined in all types and subtypes. Set if a Dynamic_Predicate aspect
ee4eee0a
AC
1642-- was explicitly applied to the type. Generally we treat predicates as
1643-- static if possible, regardless of whether they are specified using
1644-- Predicate, Static_Predicate, or Dynamic_Predicate. And if a predicate
1645-- can be treated as static (i.e. its expression is predicate-static),
1646-- then the flag Has_Static_Predicate will be set True. But there are
1647-- cases where legality is affected by the presence of an explicit
1648-- Dynamic_Predicate aspect. For example, even if a predicate looks
1649-- static, you can't use it in a case statement if there is an explicit
1650-- Dynamic_Predicate aspect specified. So test Has_Static_Predicate if
1651-- you just want to know if the predicate can be evaluated statically,
1652-- but test Has_Dynamic_Predicate_Aspect to enforce legality rules about
1653-- the use of dynamic predicates.
aab45d22 1654
70482933
RK
1655-- Has_Entries (synthesized)
1656-- Applies to concurrent types. True if any entries are declared
1657-- within the task or protected definition for the type.
1658
a7cadd18 1659-- Has_Enumeration_Rep_Clause
30ebb114 1660-- Defined in enumeration types. Set if an enumeration representation
70482933
RK
1661-- clause has been given for this enumeration type. Used to prevent more
1662-- than one enumeration representation clause for a given type. Note
1663-- that this does not imply a representation with holes, since the rep
1664-- clause may merely confirm the default 0..N representation.
1665
a7cadd18 1666-- Has_Exit
30ebb114 1667-- Defined in loop entities. Set if the loop contains an exit statement.
70482933 1668
a7cadd18 1669-- Has_Expanded_Contract
c9d70ab1
AC
1670-- Defined in functions, procedures, entries, and entry families. Set
1671-- when a subprogram has a N_Contract node that has been expanded. The
1672-- flag prevents double expansion of a contract when a construct is
1673-- rewritten into something else and subsequently reanalyzed/expanded.
1674
70482933 1675-- Has_Foreign_Convention (synthesized)
148c86d1
EB
1676-- Applies to all entities. Determines if the Convention for the entity
1677-- is a foreign convention, i.e. non-native: other than Convention_Ada,
1678-- Convention_Intrinsic, Convention_Entry, Convention_Protected,
1679-- Convention_Stubbed and Convention_Ada_Pass_By_(Copy,Reference).
70482933 1680
a7cadd18 1681-- Has_Forward_Instantiation
124092ee
AC
1682-- Defined in package entities. Set for packages that instantiate local
1683-- generic entities before the corresponding generic body has been seen.
1684-- If a package has a forward instantiation, we cannot inline subprograms
1685-- appearing in the same package because the placement requirements of
4ef36ac7 1686-- the instance will conflict with the linear elaboration of front-end
124092ee 1687-- inlining.
70482933 1688
a7cadd18 1689-- Has_Fully_Qualified_Name
124092ee
AC
1690-- Defined in all entities. Set if the name in the Chars field has been
1691-- replaced by the fully qualified name, as used for debug output. See
1692-- Exp_Dbug for a full description of the use of this flag and also the
1693-- related flag Has_Qualified_Name.
70482933 1694
a7cadd18 1695-- Has_Gigi_Rep_Item
30ebb114 1696-- Defined in all entities. Set if the rep item chain (referenced by
fdce4bb7 1697-- First_Rep_Item and linked through the Next_Rep_Item chain) contains a
28bc3323
AC
1698-- representation item that needs to be specially processed by the back
1699-- end, i.e. one of the following items:
70482933
RK
1700--
1701-- Machine_Attribute pragma
1702-- Linker_Alias pragma
d9e0a587
EB
1703-- Linker_Constructor pragma
1704-- Linker_Destructor pragma
70482933 1705-- Weak_External pragma
2a1f6a1f 1706-- Thread_Local_Storage pragma
70482933 1707--
28bc3323
AC
1708-- If this flag is set, then the backend should scan the rep item chain
1709-- to process any of these items that appear. At least one such item will
70482933 1710-- be present.
19992053 1711--
a7cadd18 1712-- Has_Homonym
30ebb114 1713-- Defined in all entities. Set if an entity has a homonym in the same
28bc3323 1714-- scope. Used by the backend to generate unique names for all entities.
383e179e 1715
a7cadd18 1716-- Has_Implicit_Dereference
30ebb114 1717-- Defined in types and discriminants. Set if the type has an aspect
0da80d7d
AC
1718-- Implicit_Dereference. Set also on the discriminant named in the aspect
1719-- clause, to simplify type resolution.
1720
a7cadd18 1721-- Has_Independent_Components [implementation base type only]
28fa5430
AC
1722-- Defined in all types and objects. Set only for a record type or an
1723-- array type or array object if a valid pragma Independent_Components
1724-- applies to the type or object. Note that in the case of an object,
1725-- this flag is only set on the object if there was an explicit pragma
1726-- for the object. In other words, the proper test for whether an object
1727-- has independent components is to see if either the object or its base
1728-- type has this flag set. Note that in the case of a type, the pragma
1729-- will be chained to the rep item chain of the first subtype in the
a517d6c1
EB
1730-- usual manner. Also set if a pragma Has_Atomic_Components or pragma
1731-- Has_Aliased_Components applies to the type or object.
ca1ffed0 1732
a7cadd18 1733-- Has_Inheritable_Invariants [base type only]
3ddfabe3
AC
1734-- Defined in all type entities. Set on private types and interface types
1735-- which define at least one class-wide invariant. Such invariants must
1736-- be inherited by derived types. The flag is also set on the full view
1737-- of a private type for completeness.
ca1ffed0 1738
a7cadd18 1739-- Has_Inherited_DIC [base type only]
f63d601b
HK
1740-- Defined in all type entities. Set for a derived type which inherits
1741-- pragma Default_Initial_Condition from a parent type.
e477d718 1742
a7cadd18 1743-- Has_Inherited_Invariants [base type only]
3ddfabe3 1744-- Defined in all type entities. Set on private extensions and derived
08f66419 1745-- types which inherit at least one class-wide invariant from a parent or
3ddfabe3
AC
1746-- an interface type. The flag is also set on the full view of a private
1747-- extension for completeness.
1748
a7cadd18 1749-- Has_Initial_Value
30ebb114 1750-- Defined in entities for variables and out parameters. Set if there
5d37ba92
ES
1751-- is an explicit initial value expression in the declaration of the
1752-- variable. Note that this is set only if this initial value is
1753-- explicit, it is not set for the case of implicit initialization
1754-- of access types or controlled types. Always set to False for out
30ebb114 1755-- parameters. Also defined in entities for in and in-out parameters,
5d37ba92 1756-- but always false in these cases.
383e179e 1757
70482933 1758-- Has_Interrupt_Handler (synthesized)
fbf5a39b 1759-- Applies to all protected type entities. Set if the protected type
70482933
RK
1760-- definition contains at least one procedure to which a pragma
1761-- Interrupt_Handler applies.
1762
3ddfabe3
AC
1763-- Has_Invariants (synthesized)
1764-- Defined in all type entities. True if the type defines at least one
1765-- invariant of its own or inherits at least one class-wide invariant
1766-- from a parent type or an interface.
e606088a 1767
b2dea70e
JM
1768-- Has_Limited_View (synth)
1769-- Defined in all entities. True for non-generic package entities that
1770-- are non-instances and their Limited_View attribute is present.
1771
a7cadd18 1772-- Has_Loop_Entry_Attributes
d436b30d
AC
1773-- Defined in E_Loop entities. Set when the loop is subject to at least
1774-- one attribute 'Loop_Entry. The flag also implies that the loop has
1775-- already been transformed. See Expand_Loop_Entry_Attribute for details.
1776
a7cadd18 1777-- Has_Machine_Radix_Clause
30ebb114 1778-- Defined in decimal types and subtypes, set if a Machine_Radix
70482933
RK
1779-- representation clause is present. This flag is used to detect
1780-- the error of multiple machine radix clauses for a single type.
1781
a7cadd18 1782-- Has_Master_Entity
30ebb114 1783-- Defined in entities that can appear in the scope stack (see spec
70482933
RK
1784-- of Sem). It is set if a task master entity (_master) has been
1785-- declared and initialized in the corresponding scope.
1786
a7cadd18 1787-- Has_Missing_Return
30ebb114 1788-- Defined in functions and generic functions. Set if there is one or
70482933
RK
1789-- more missing return statements in the function. This is used to
1790-- control wrapping of the body in Exp_Ch6 to ensure that the program
e51102b2 1791-- error exception is correctly raised in this case at run time.
70482933 1792
a7cadd18 1793-- Has_Nested_Block_With_Handler
30ebb114 1794-- Defined in scope entities. Set if there is a nested block within the
70482933
RK
1795-- scope that has an exception handler and the two scopes are in the
1796-- same procedure. This is used by the backend for controlling certain
1797-- optimizations to ensure that they are consistent with exceptions.
28bc3323 1798-- See documentation in backend for further details.
70482933 1799
a7cadd18 1800-- Has_Nested_Subprogram
a7837c08
JM
1801-- Defined in subprogram entities. Set for a subprogram which contains at
1802-- least one nested subprogram.
5a271a7f 1803
47346923
AC
1804-- Has_Non_Limited_View (synth)
1805-- Defined in E_Incomplete_Type, E_Incomplete_Subtype, E_Class_Wide_Type,
1806-- E_Abstract_State entities. True if their Non_Limited_View attribute
1807-- is present.
1808
08f52d9f
AC
1809-- Has_Non_Null_Abstract_State (synth)
1810-- Defined in package entities. True if the package is subject to a non-
1811-- null Abstract_State aspect/pragma.
1812
2f54ef3d
AC
1813-- Has_Non_Null_Visible_Refinement (synth)
1814-- Defined in E_Abstract_State entities. True if the state has a visible
1815-- refinement of at least one variable or state constituent as expressed
1816-- in aspect/pragma Refined_State.
c5c0ce68 1817
a7cadd18 1818-- Has_Non_Standard_Rep [implementation base type only]
30ebb114 1819-- Defined in all type entities. Set when some representation clause
70482933
RK
1820-- or pragma causes the representation of the item to be significantly
1821-- modified. In this category are changes of small or radix for a
1822-- fixed-point type, change of component size for an array, and record
1823-- or enumeration representation clauses, as well as packed pragmas.
1824-- All other representation clauses (e.g. Size and Alignment clauses)
1825-- are not considered to be significant since they do not affect
1826-- stored bit patterns.
1827
39af2bac
AC
1828-- Has_Null_Abstract_State (synth)
1829-- Defined in package entities. True if the package is subject to a null
1830-- Abstract_State aspect/pragma.
1831
2f54ef3d
AC
1832-- Has_Null_Visible_Refinement (synth)
1833-- Defined in E_Abstract_State entities. True if the state has a visible
1834-- null refinement as expressed in aspect/pragma Refined_State.
124092ee 1835
a7cadd18 1836-- Has_Object_Size_Clause
30ebb114 1837-- Defined in entities for types and subtypes. Set if an Object_Size
42e4b796 1838-- clause has been processed for the type. Used to prevent multiple
70482933
RK
1839-- Object_Size clauses for a given entity.
1840
a7cadd18 1841-- Has_Out_Or_In_Out_Parameter
551e1935 1842-- Present in subprograms, generic subprograms, entries, and entry
288cbbbd
JM
1843-- families. Set if they have at least one OUT or IN OUT parameter
1844-- (allowed for functions only in Ada 2012).
fc999c5d 1845
a7cadd18 1846-- Has_Own_DIC [base type only]
f63d601b 1847-- Defined in all type entities. Set for a private type and its full view
53ac0963
PT
1848-- (and its underlying full view, if the full view is itself private)
1849-- when the type is subject to pragma Default_Initial_Condition.
f63d601b 1850
a7cadd18 1851-- Has_Own_Invariants [base type only]
08f66419 1852-- Defined in all type entities. Set on any type that defines at least
b97813ab
EB
1853-- one invariant of its own.
1854
1855-- Note: this flag is set on both partial and full view of types to which
1856-- an Invariant pragma or aspect applies, and on the underlying full view
1857-- if the full view is private.
3ddfabe3 1858
a7cadd18 1859-- Has_Partial_Visible_Refinement
d89ce432
AC
1860-- Defined in E_Abstract_State entities. Set when a state has at least
1861-- one refinement constituent subject to indicator Part_Of, and analysis
1862-- is in the region between the declaration of the first constituent for
1863-- this abstract state (in the private part of the package) and the end
1864-- of the package spec or body with visibility over this private part
1865-- (which includes the package itself and its child packages).
1866
a7cadd18 1867-- Has_Per_Object_Constraint
124092ee
AC
1868-- Defined in E_Component entities. Set if the subtype of the component
1869-- has a per object constraint. Per object constraints result from the
46924ad7 1870-- following situations:
5d09245e
AC
1871--
1872-- 1. N_Attribute_Reference - when the prefix is the enclosing type and
1873-- the attribute is Access.
1874-- 2. N_Discriminant_Association - when the expression uses the
1875-- discriminant of the enclosing type.
1876-- 3. N_Index_Or_Discriminant_Constraint - when at least one of the
1877-- individual constraints is a per object constraint.
1878-- 4. N_Range - when the lower or upper bound uses the discriminant of
1879-- the enclosing type.
1880-- 5. N_Range_Constraint - when the range expression uses the
1881-- discriminant of the enclosing type.
70482933 1882
a7cadd18 1883-- Has_Pragma_Controlled [implementation base type only]
30ebb114 1884-- Defined in access type entities. It is set if a pragma Controlled
70482933
RK
1885-- applies to the access type.
1886
a7cadd18 1887-- Has_Pragma_Elaborate_Body
30ebb114 1888-- Defined in all entities. Set in compilation unit entities if a
70482933
RK
1889-- pragma Elaborate_Body applies to the compilation unit.
1890
a7cadd18 1891-- Has_Pragma_Inline
30ebb114 1892-- Defined in all entities. Set for functions and procedures for which a
ce0bead3
HK
1893-- pragma Inline or Inline_Always applies to the subprogram. Note that
1894-- this flag can be set even if Is_Inlined is not set. This happens for
1895-- pragma Inline (if Inline_Active is False). In other words, the flag
1896-- Has_Pragma_Inline represents the formal semantic status, and is used
1897-- for checking semantic correctness. The flag Is_Inlined indicates
1898-- whether inlining is actually active for the entity.
1899
a7cadd18 1900-- Has_Pragma_Inline_Always
30ebb114 1901-- Defined in all entities. Set for functions and procedures for which a
ce0bead3
HK
1902-- pragma Inline_Always applies. Note that if this flag is set, the flag
1903-- Has_Pragma_Inline is also set.
70482933 1904
a7cadd18 1905-- Has_Pragma_No_Inline
42ae3870
AC
1906-- Defined in all entities. Set for functions and procedures for which a
1907-- pragma No_Inline applies. Note that if this flag is set, the flag
1908-- Has_Pragma_Inline_Always cannot be set.
1909
a7cadd18 1910-- Has_Pragma_Ordered [implementation base type only]
30ebb114 1911-- Defined in entities for enumeration types. If set indicates that a
bd29d519
AC
1912-- valid pragma Ordered was given for the type. This flag is inherited
1913-- by derived enumeration types. We don't need to distinguish the derived
1914-- case since we allow multiple occurrences of this pragma anyway.
1915
a7cadd18 1916-- Has_Pragma_Pack [implementation base type only]
30ebb114 1917-- Defined in array and record type entities. If set, indicates that a
a01b9df6
AC
1918-- valid pragma Pack was given for the type. Note that this flag is not
1919-- inherited by derived type. See also the Is_Packed flag.
70482933 1920
a7cadd18 1921-- Has_Pragma_Preelab_Init
02886c2e
AC
1922-- Defined in type and subtype entities. If set indicates that a valid
1923-- pragma Preelaborable_Initialization applies to the type.
1924
a7cadd18 1925-- Has_Pragma_Pure
30ebb114 1926-- Defined in all entities. If set, indicates that a valid pragma Pure
ba673907
JM
1927-- was given for the entity. In some cases, we need to test whether
1928-- Is_Pure was explicitly set using this pragma.
1929
a7cadd18 1930-- Has_Pragma_Pure_Function
30ebb114 1931-- Defined in all entities. If set, indicates that a valid pragma
02886c2e
AC
1932-- Pure_Function was given for the entity. In some cases, we need to test
1933-- whether Is_Pure was explicitly set using this pragma. We also set
39231404
AC
1934-- this flag for some internal entities that we know should be treated
1935-- as pure for optimization purposes.
0839863c 1936
a7cadd18 1937-- Has_Pragma_Thread_Local_Storage
30ebb114 1938-- Defined in all entities. If set, indicates that a valid pragma
4c8a5bb8
AC
1939-- Thread_Local_Storage was given for the entity.
1940
a7cadd18 1941-- Has_Pragma_Unmodified
30ebb114 1942-- Defined in all entities. Can only be set for variables (E_Variable,
9d77af56
RD
1943-- E_Out_Parameter, E_In_Out_Parameter). Set if a valid pragma Unmodified
1944-- applies to the variable, indicating that no warning should be given
0f282086
RD
1945-- if the entity is never modified. Note that clients should generally
1946-- not test this flag directly, but instead use function Has_Unmodified.
9d77af56 1947
a7cadd18 1948-- Has_Pragma_Unreferenced
30ebb114 1949-- Defined in all entities. Set if a valid pragma Unreferenced applies
9d77af56 1950-- to the entity, indicating that no warning should be given if the
07fc65c4 1951-- entity has no references, but a warning should be given if it is
f937473f 1952-- in fact referenced. For private types, this flag is set in both the
0f282086
RD
1953-- private entity and full entity if the pragma applies to either. Note
1954-- that clients should generally not test this flag directly, but instead
1955-- use function Has_Unreferenced.
f937473f 1956
a7cadd18 1957-- Has_Pragma_Unreferenced_Objects
9d1d00ca
JS
1958-- Defined in all entities. Set if a valid pragma Unused applies to an
1959-- entity, indicating that warnings should be given if the entity is
1960-- modified or referenced. This pragma is equivalent to a pair of
1961-- Unmodified and Unreferenced pragmas.
1962
a7cadd18 1963-- Has_Pragma_Unused
31fde973 1964-- Defined in all entities. Set if a valid pragma Unused applies to a
9d1d00ca
JS
1965-- variable or entity, indicating that warnings should not be given if
1966-- it is never modified or referenced. Note: This pragma is exactly
1967-- equivalent Unmodified and Unreference combined.
07fc65c4 1968
a7cadd18 1969-- Has_Predicates
fc142f63
AC
1970-- Defined in type and subtype entities. Set if a pragma Predicate or
1971-- Predicate aspect applies to the type or subtype, or if it inherits a
1972-- Predicate aspect from its parent or progenitor types.
1e60643a
AC
1973--
1974-- Note: this flag is set on both partial and full view of types to which
b97813ab
EB
1975-- a Predicate pragma or aspect applies, and on the underlying full view
1976-- if the full view is private.
fd0ff1cf 1977
a7cadd18 1978-- Has_Primitive_Operations [base type only]
30ebb114 1979-- Defined in all type entities. Set if at least one primitive operation
07fc65c4 1980-- is defined for the type.
70482933 1981
a7cadd18 1982-- Has_Private_Ancestor
7f1a5156
EB
1983-- Applies to type extensions. True if some ancestor is derived from a
1984-- private type, making some components invisible and aggregates illegal.
1985-- This flag is set at the point of derivation. The legality of the
1986-- aggregate must be rechecked because it also depends on the visibility
316e3a13
RD
1987-- at the point the aggregate is resolved. See sem_aggr.adb. This is part
1988-- of AI05-0115.
70482933 1989
a7cadd18 1990-- Has_Private_Declaration
124092ee
AC
1991-- Defined in all entities. Set if it is the defining entity of a private
1992-- type declaration or its corresponding full declaration. This flag is
1993-- thus preserved when the full and the partial views are exchanged, to
1994-- indicate if a full type declaration is a completion. Used for semantic
1995-- checks in E.4(18) and elsewhere.
70482933 1996
a7cadd18 1997-- Has_Private_Extension
48c8c473
AC
1998-- Defined in tagged types. Set to indicate that the tagged type has some
1999-- private extension. Used to report a warning on public primitives added
2000-- after defining its private extensions.
2001
a7cadd18 2002-- Has_Protected [base type only]
96e90ac1
RD
2003-- Defined in all type entities. Set on protected types themselves, and
2004-- also (recursively) on any composite type which has a component for
fb757f7d
AC
2005-- which Has_Protected is set, unless the protected type is declared in
2006-- the private part of an internal unit. The meaning is that restrictions
2007-- for protected types apply to this type. Note: the flag is not set on
2008-- access types, even if they designate an object that Has_Protected.
96e90ac1 2009
a7cadd18 2010-- Has_Qualified_Name
124092ee
AC
2011-- Defined in all entities. Set if the name in the Chars field has
2012-- been replaced by its qualified name, as used for debug output. See
2013-- Exp_Dbug for a full description of qualification requirements. For
2014-- some entities, the name is the fully qualified name, but there are
2015-- exceptions. In particular, for local variables in procedures, we
2016-- do not include the procedure itself or higher scopes. See also the
2017-- flag Has_Fully_Qualified_Name, which is set if the name does indeed
2018-- include the fully qualified name.
70482933 2019
a7cadd18 2020-- Has_RACW
30ebb114
AC
2021-- Defined in package spec entities. Set if the spec contains the
2022-- declaration of a remote access-to-classwide type.
f937473f 2023
a7cadd18 2024-- Has_Record_Rep_Clause [implementation base type only]
30ebb114 2025-- Defined in record types. Set if a record representation clause has
70482933
RK
2026-- been given for this record type. Used to prevent more than one such
2027-- clause for a given record type. Note that this is initially cleared
2028-- for a derived type, even though the representation is inherited. See
2029-- also the flag Has_Specified_Layout.
2030
a7cadd18 2031-- Has_Recursive_Call
30ebb114 2032-- Defined in procedures. Set if a direct parameterless recursive call
70482933
RK
2033-- is detected while analyzing the body. Used to activate some error
2034-- checks for infinite recursion.
2035
a7cadd18 2036-- Has_Shift_Operator [base type only]
4c51ff88
AC
2037-- Defined in integer types. Set in the base type of an integer type for
2038-- which at least one of the shift operators is defined.
2039
a7cadd18 2040-- Has_Size_Clause
a547eea2
BD
2041-- Defined in entities for types and objects. Set if a size or value size
2042-- clause is defined for the entity. Used to prevent multiple clauses
2043-- for a given entity. Note that it is always initially cleared for a
2044-- derived type, even though the Size or Value_Size clause for such a
2045-- type might be inherited from an ancestor type.
70482933 2046
a7cadd18 2047-- Has_Small_Clause
30ebb114 2048-- Defined in ordinary fixed point types (but not subtypes). Indicates
70482933
RK
2049-- that a small clause has been given for the entity. Used to prevent
2050-- multiple Small clauses for a given entity. Note that it is always
2051-- initially cleared for a derived type, even though the Small for such
2052-- a type is inherited from a Small clause given for the parent type.
2053
a7cadd18 2054-- Has_Specified_Layout [implementation base type only]
30ebb114 2055-- Defined in all type entities. Set for a record type or subtype if
70482933
RK
2056-- the record layout has been specified by a record representation
2057-- clause. Note that this differs from the flag Has_Record_Rep_Clause
2058-- in that it is inherited by a derived type. Has_Record_Rep_Clause is
2059-- used to indicate that the type is mentioned explicitly in a record
2060-- representation clause, and thus is not inherited by a derived type.
2061-- This flag is always False for non-record types.
2062
a7cadd18
BD
2063-- Has_Specified_Stream_Input
2064-- Has_Specified_Stream_Output
2065-- Has_Specified_Stream_Read
2066-- Has_Specified_Stream_Write
30ebb114 2067-- Defined in all type and subtype entities. Set for a given view if the
edd63e9b
ES
2068-- corresponding stream-oriented attribute has been defined by an
2069-- attribute definition clause. When such a clause occurs, a TSS is set
2070-- on the underlying full view; the flags are used to track visibility of
2071-- the attribute definition clause for partial or incomplete views.
383e179e 2072
a7cadd18 2073-- Has_Static_Discriminants
30ebb114 2074-- Defined in record subtypes constrained by discriminant values. Set if
6e443c90
RD
2075-- all the discriminant values have static values, meaning that in the
2076-- case of a variant record, the component list can be trimmed down to
2077-- include only the components corresponding to these discriminants.
383e179e 2078
a7cadd18 2079-- Has_Static_Predicate
edab6088
RD
2080-- Defined in all types and subtypes. Set if the type (which must be a
2081-- scalar type) has a predicate whose expression is predicate-static.
12e4e81e 2082-- This can result from the use of any Predicate, Static_Predicate, or
edab6088
RD
2083-- Dynamic_Predicate aspect. We can distinguish these cases by testing
2084-- Has_Static_Predicate_Aspect and Has_Dynamic_Predicate_Aspect. See
2085-- description of the latter flag for further information on dynamic
2086-- predicates which are also static.
ee4eee0a 2087
a7cadd18 2088-- Has_Static_Predicate_Aspect
2c8d828a 2089-- Defined in all types and subtypes. Set if a Static_Predicate aspect
aab45d22 2090-- applies to the type. Note that we can tell if a static predicate is
ee4eee0a
AC
2091-- present by looking at Has_Static_Predicate, but this could have come
2092-- from a Predicate aspect or pragma or even from a Dynamic_Predicate
2093-- aspect. When we need to know the difference (e.g. to know what set of
2094-- check policies apply, use this flag and Has_Dynamic_Predicate_Aspect
c624298a 2095-- to determine which case we have).
aab45d22 2096
a7cadd18 2097-- Has_Storage_Size_Clause [implementation base type only]
30ebb114 2098-- Defined in task types and access types. It is set if a Storage_Size
70482933
RK
2099-- clause is present for the type. Used to prevent multiple clauses for
2100-- one type. Note that this flag is initially cleared for a derived type
2101-- even though the Storage_Size for such a type is inherited from a
2102-- Storage_Size clause given for the parent type. Note that in the case
30ebb114 2103-- of access types, this flag is defined only in the root type, since a
70482933
RK
2104-- storage size clause cannot be given to a derived type.
2105
a7cadd18 2106-- Has_Stream_Size_Clause
30ebb114 2107-- Defined in all entities. It is set for types which have a Stream_Size
fdce4bb7
JM
2108-- clause attribute. Used to prevent multiple Stream_Size clauses for a
2109-- given entity, and also whether it is necessary to check for a stream
2110-- size clause.
82c80734 2111
a7cadd18 2112-- Has_Task [base type only]
30ebb114 2113-- Defined in all type entities. Set on task types themselves, and also
70482933 2114-- (recursively) on any composite type which has a component for which
f937473f
RD
2115-- Has_Task is set. The meaning is that an allocator or declaration of
2116-- such an object must create the required tasks. Note: the flag is not
2117-- set on access types, even if they designate an object that Has_Task.
70482933 2118
a7cadd18 2119-- Has_Timing_Event [base type only]
4969efdf
AC
2120-- Defined in all type entities. Set on language defined type
2121-- Ada.Real_Time.Timing_Events.Timing_Event, and also (recursively) on
2122-- any composite type which has a component for which Has_Timing_Event
2123-- is set. Used for the No_Local_Timing_Event restriction.
2124
a7cadd18 2125-- Has_Thunks
ce0bead3
HK
2126-- Applies to E_Constant entities marked Is_Tag. True for secondary tag
2127-- referencing a dispatch table whose contents are pointers to thunks.
2128
a7cadd18 2129-- Has_Unchecked_Union [base type only]
30ebb114 2130-- Defined in all type entities. Set on unchecked unions themselves
70482933
RK
2131-- and (recursively) on any composite type which has a component for
2132-- which Has_Unchecked_Union is set. The meaning is that a comparison
45ec05e1
RD
2133-- operation or 'Valid_Scalars reference for the type is not permitted.
2134-- Note that the flag is not set on access types, even if they designate
2135-- an object that has the flag Has_Unchecked_Union set.
70482933 2136
a7cadd18 2137-- Has_Unknown_Discriminants
30ebb114 2138-- Defined in all entities. Set for types with unknown discriminants.
fdce4bb7
JM
2139-- Types can have unknown discriminants either from their declaration or
2140-- through type derivation. The use of this flag exactly meets the spec
2141-- in RM 3.7(26). Note that all class-wide types are considered to have
15e934bf 2142-- unknown discriminants. Note that both flags Has_Discriminants and
fdce4bb7
JM
2143-- Has_Unknown_Discriminants may be true for a type. Class-wide types and
2144-- their subtypes have unknown discriminants and can have declared ones
2145-- as well. Private types declared with unknown discriminants may have a
2146-- full view that has explicit discriminants, and both flag will be set
03a72cd3 2147-- on the partial view, to ensure that discriminants are properly
fdce4bb7 2148-- inherited in certain contexts.
70482933 2149
a7cadd18 2150-- Has_Visible_Refinement
c5c0ce68
HK
2151-- Defined in E_Abstract_State entities. Set when a state has at least
2152-- one refinement constituent and analysis is in the region between
2153-- pragma Refined_State and the end of the package body declarations.
2154
a7cadd18 2155-- Has_Volatile_Components [implementation base type only]
30ebb114 2156-- Defined in all types and objects. Set only for an array type or array
ce0bead3
HK
2157-- object if a valid pragma Volatile_Components or a valid pragma
2158-- Atomic_Components applies to the type or object. Note that in the case
2159-- of an object, this flag is only set on the object if there was an
2160-- explicit pragma for the object. In other words, the proper test for
2161-- whether an object has volatile components is to see if either the
2162-- object or its base type has this flag set. Note that in the case of a
2163-- type the pragma will be chained to the rep item chain of the first
2164-- subtype in the usual manner.
70482933 2165
a7cadd18 2166-- Has_Xref_Entry
30ebb114 2167-- Defined in all entities. Set if an entity has an entry in the Xref
fdce4bb7
JM
2168-- information generated in ali files. This is true for all source
2169-- entities in the extended main source file. It is also true of entities
2170-- in other packages that are referenced directly or indirectly from the
2171-- main source file (indirect reference occurs when the main source file
2172-- references an entity with a type reference. See package Lib.Xref for
2173-- further details).
fbf5a39b 2174
a7cadd18 2175-- Has_Yield_Aspect
8afbdb8a
JM
2176-- Defined in subprograms, generic subprograms, entries, entry families.
2177-- Set if the entity has aspect Yield.
2178
a7cadd18 2179-- Hiding_Loop_Variable
30ebb114 2180-- Defined in variables. Set only if a variable of a discrete type is
70482933
RK
2181-- hidden by a loop variable in the same local scope, in which case
2182-- the Hiding_Loop_Variable field of the hidden variable points to
fbf5a39b 2183-- the E_Loop_Parameter entity doing the hiding. Used in processing
70482933
RK
2184-- warning messages if the hidden variable turns out to be unused
2185-- or is referenced without being set.
2186
a7cadd18 2187-- Hidden_In_Formal_Instance
651822ae
ES
2188-- Defined on actuals for formal packages. Entities on the list are
2189-- formals that are hidden outside of the formal package when this
2190-- package is not declared with a box, or the formal itself is not
2191-- defaulted (see RM 12.7 (10)). Their visibility is restored on exit
2192-- from the current generic, because the actual for the formal package
2193-- may be used subsequently in the current unit.
2194
a7cadd18 2195-- Homonym
30ebb114 2196-- Defined in all entities. Link for list of entities that have the
70482933
RK
2197-- same source name and that are declared in the same or enclosing
2198-- scopes. Homonyms in the same scope are overloaded. Used for name
2199-- resolution and for the generation of debugging information.
2200
a7cadd18 2201-- Ignore_SPARK_Mode_Pragmas
cf9a473e
AC
2202-- Present in concurrent type, entry, operator, [generic] package,
2203-- package body, [generic] subprogram, and subprogram body entities.
2204-- Set when the entity appears in an instance subject to SPARK_Mode
2205-- "off" and indicates that all SPARK_Mode pragmas found within must
2206-- be ignored.
2207
475e1d24
JM
2208-- Ignored_Class_Postconditions
2209-- Defined on subprogram entities. Set if the subprogram has class-wide
2210-- postconditions. Denotes the (and-then) expression built by merging
2211-- inherited ignored class-wide postconditions with its own ignored
2212-- class-wide postconditions.
2213
2214-- Ignored_Class_Preconditions
2215-- Defined on subprogram entities. Set if the subprogram has class-wide
2216-- preconditions. Denotes the (or-else) expression built by merging
2217-- inherited ignored class-wide preconditions with its own ignored
2218-- class-wide preconditions.
2219
70482933 2220-- Implementation_Base_Type (synthesized)
ce0bead3
HK
2221-- Applies to all entities. For types, similar to Base_Type, but never
2222-- returns a private type when applied to a non-private type. Instead in
2223-- this case, it always returns the Underlying_Type of the base type, so
2224-- that we still have a concrete type. For entities other than types,
6e443c90 2225-- returns the entity unchanged.
70482933 2226
a7cadd18 2227-- Import_Pragma
32bba3c9 2228-- Defined in subprogram entities. Set if a valid pragma Import or pragma
e5cabfac 2229-- Import_Function or pragma Import_Procedure applies to the subprogram,
32bba3c9
AC
2230-- in which case this field points to the pragma (we can't use the normal
2231-- Rep_Item chain mechanism, because a single pragma Import can apply
e5cabfac 2232-- to multiple subprogram entities).
32bba3c9 2233
a7cadd18 2234-- In_Package_Body
30ebb114 2235-- Defined in package entities. Set on the entity that denotes the
fdce4bb7
JM
2236-- package (the defining occurrence of the package declaration) while
2237-- analyzing and expanding the package body. Reset on completion of
2238-- analysis/expansion.
70482933 2239
a7cadd18 2240-- In_Private_Part
30ebb114 2241-- Defined in all entities. Can be set only in package entities and
6e443c90
RD
2242-- objects. For package entities, this flag is set to indicate that the
2243-- private part of the package is being analyzed. The flag is reset at
2244-- the end of the package declaration. For objects it indicates that the
2245-- declaration of the object occurs in the private part of a package.
70482933 2246
a7cadd18 2247-- Incomplete_Actuals
90e491a7
PMR
2248-- Defined on package entities that are instances. Indicates the actuals
2249-- types in the instantiation that are limited views. If this list is
2250-- not empty, the instantiation, which appears in a package declaration,
2251-- is relocated to the corresponding package body, which must have a
2252-- corresponding nonlimited with_clause.
2253
475e1d24
JM
2254-- Indirect_Call_Wrapper
2255-- Defined on subprogram entities. Set if the subprogram has class-wide
2256-- preconditions. Denotes the internal wrapper that checks preconditions
2257-- and invokes the subprogram body. Subp'Access points to the indirect
2258-- call wrapper if available.
2259
a7cadd18 2260-- Initialization_Statements
02217452 2261-- Defined in constants and variables. For a composite object initialized
afab03da
AC
2262-- with an aggregate that has been converted to a sequence of
2263-- assignments, points to a compound statement containing the
02217452
AC
2264-- assignments.
2265
a7cadd18 2266-- Inner_Instances
30ebb114 2267-- Defined in generic units. Contains element list of units that are
6e443c90
RD
2268-- instantiated within the given generic. Used to diagnose circular
2269-- instantiations.
70482933 2270
a7cadd18 2271-- Interface_Alias
cf6956bb
AC
2272-- Defined in subprograms that cover a primitive operation of an abstract
2273-- interface type. Can be set only if the Is_Hidden flag is also set,
2274-- since such entities are always hidden. Points to its associated
2275-- interface subprogram. It is used to register the subprogram in
2276-- secondary dispatch table of the interface (Ada 2005: AI-251).
2277
a7cadd18 2278-- Interface_Name
30ebb114 2279-- Defined in constants, variables, exceptions, functions, procedures,
69d8d8b4
AC
2280-- and packages. Set to Empty unless an export, import, or interface name
2281-- pragma has explicitly specified an external name, in which case it
2282-- references an N_String_Literal node for the specified external name.
2283-- Note that if this field is Empty, and Is_Imported or Is_Exported is
2284-- set, then the default interface name is the name of the entity, cased
2285-- in a manner that is appropriate to the system in use. Note that
2286-- Interface_Name is ignored if an address clause is present (since it
2287-- is meaningless in this case).
3fd9f17c 2288
a7cadd18 2289-- Interfaces
cf6956bb
AC
2290-- Defined in record types and subtypes. List of abstract interfaces
2291-- implemented by a tagged type that are not already implemented by the
2292-- ancestors (Ada 2005: AI-251).
2293
fd0ff1cf 2294-- Invariant_Procedure (synthesized)
3ddfabe3
AC
2295-- Defined in types and subtypes. Set for private types and their full
2296-- views if one or more [class-wide] invariants apply to the type, or
2297-- when the type inherits class-wide invariants from a parent type or
2298-- an interface, or when the type is an array and its component type is
2299-- subject to an invariant, or when the type is record and contains a
2300-- component subject to an invariant (property is recursive). Points to
2301-- to the entity for a procedure which checks all these invariants. The
2302-- invariant procedure takes a single argument of the given type, and
2303-- returns if the invariant holds, or raises exception Assertion_Error
2304-- with an appropriate message if it does not hold. This attribute is
2305-- defined but always Empty for private subtypes.
2306
fd0ff1cf
RD
2307-- Note: the reason this is marked as a synthesized attribute is that the
2308-- way this is stored is as an element of the Subprograms_For_Type field.
e606088a 2309
a7cadd18 2310-- In_Use
30ebb114 2311-- Defined in packages and types. Set when analyzing a use clause for
70482933
RK
2312-- the corresponding entity. Reset at end of corresponding declarative
2313-- part. The flag on a type is also used to determine the visibility of
2314-- the primitive operators of the type.
729d2e2a
JS
2315--
2316-- Note that manipulation of scopes on the scope stack will also cause
2317-- the flag to be set/unset since the setting of scopes affects
2318-- visibility.
70482933 2319
a7cadd18 2320-- Is_Abstract_Subprogram
30ebb114 2321-- Defined in all subprograms and entries. Set for abstract subprograms.
f937473f
RD
2322-- Always False for enumeration literals and entries. See also
2323-- Requires_Overriding.
2324
a7cadd18 2325-- Is_Abstract_Type
30ebb114 2326-- Defined in all types. Set for abstract types.
70482933 2327
a7cadd18 2328-- Is_Access_Constant
30ebb114 2329-- Defined in access types and subtypes. Indicates that the keyword
70482933
RK
2330-- constant was present in the access type definition.
2331
f937473f
RD
2332-- Is_Access_Protected_Subprogram_Type (synthesized)
2333-- Applies to all types, true for named and anonymous access to
2334-- protected subprograms.
2335
70482933
RK
2336-- Is_Access_Type (synthesized)
2337-- Applies to all entities, true for access types and subtypes
2338
606e70fd
AC
2339-- Is_Access_Object_Type (synthesized)
2340-- Applies to all entities, true for access-to-object types and subtypes
2341
a7cadd18 2342-- Is_Activation_Record
9ea43db6 2343-- Applies to E_In_Parameters generated in Exp_Unst for nested
7037d2bb
ES
2344-- subprograms, to mark the added formal that carries the activation
2345-- record created in the enclosing subprogram.
2346
a7cadd18 2347-- Is_Actual_Subtype
405b907c
AC
2348-- Defined on all types, true for the generated constrained subtypes
2349-- that are built for unconstrained composite actuals.
2350
a7cadd18 2351-- Is_Ada_2005_Only
30ebb114 2352-- Defined in all entities, true if a valid pragma Ada_05 or Ada_2005
599a7411
AC
2353-- applies to the entity which specifically names the entity, indicating
2354-- that the entity is Ada 2005 only. Note that this flag is not set if
2355-- the entity is part of a unit compiled with the normal no-argument form
2356-- of pragma Ada_05 or Ada_2005.
2357
a7cadd18 2358-- Is_Ada_2012_Only
30ebb114 2359-- Defined in all entities, true if a valid pragma Ada_12 or Ada_2012
599a7411
AC
2360-- applies to the entity which specifically names the entity, indicating
2361-- that the entity is Ada 2012 only. Note that this flag is not set if
2362-- the entity is part of a unit compiled with the normal no-argument form
2363-- of pragma Ada_12 or Ada_2012.
82c80734 2364
07537fe6
JM
2365-- Is_Ada_2022_Only
2366-- Defined in all entities, true if a valid pragma Ada_2022 applies to
2367-- the entity which specifically names the entity, indicating that the
2368-- entity is Ada 2022 only. Note that this flag is not set if the entity
2369-- is part of a unit compiled with the normal no-argument form of pragma
2370-- Ada_2022.
2371
a7cadd18 2372-- Is_Aliased
30ebb114 2373-- Defined in all entities. Set for objects and types whose declarations
fecbd779
AC
2374-- carry the keyword aliased, and on record components that have the
2375-- keyword. For Ada 2012, also applies to formal parameters.
70482933 2376
02886c2e
AC
2377-- Is_Array_Type (synthesized)
2378-- Applies to all entities, true for array types and subtypes
2379
a7cadd18 2380-- Is_Asynchronous
02886c2e
AC
2381-- Defined in all type entities and in procedure entities. Set
2382-- if a pragma Asynchronous applies to the entity.
2383
a7cadd18 2384-- Is_Atomic
088c7e1b 2385-- Defined in all type entities, and also in constants, components, and
70482933
RK
2386-- variables. Set if a pragma Atomic or Shared applies to the entity.
2387-- In the case of private and incomplete types, this flag is set in
2388-- both the partial view and the full view.
2389
b120ca61 2390-- Is_Full_Access (synth)
f280dd8f 2391-- Defined in all type entities, and also in constants, components and
b120ca61 2392-- variables. Set if an aspect/pragma Atomic/Shared, or an aspect/pragma
81e68a19 2393-- Volatile_Full_Access or an Ada 2022 aspect Full_Access_Only applies
b120ca61 2394-- to the entity. In the case of private and incomplete types, the flag
f280dd8f
RD
2395-- applies to both the partial view and the full view.
2396
d347f572 2397-- Is_Base_Type (synthesized)
3ddfabe3 2398-- Applies to type and subtype entities. True if entity is a base type.
d347f572 2399
a7cadd18 2400-- Is_Bit_Packed_Array [implementation base type only]
30ebb114 2401-- Defined in all entities. This flag is set for a packed array type that
607114db 2402-- is bit-packed (i.e. the component size is known by the front end and
6186a6ef 2403-- is in the range 1-63 but not a multiple of 8). Is_Packed is always set
ce0bead3 2404-- if Is_Bit_Packed_Array is set, but it is possible for Is_Packed to be
b3f75672
EB
2405-- set without Is_Bit_Packed_Array if the component size is not known by
2406-- the front-end or for the case of an array having one or more index
2407-- types that are enumeration types with non-standard representation.
70482933
RK
2408
2409-- Is_Boolean_Type (synthesized)
2410-- Applies to all entities, true for boolean types and subtypes,
2411-- i.e. Standard.Boolean and all types ultimately derived from it.
2412
a7cadd18 2413-- Is_Called
4b96d386
EB
2414-- Defined in subprograms and packages. Set if a subprogram is called
2415-- from the unit being compiled or a unit in the closure. Also set for
2416-- a package that contains called subprograms. Used only for inlining.
70482933 2417
a7cadd18 2418-- Is_Character_Type
30ebb114 2419-- Defined in all entities. Set for character types and subtypes,
70482933
RK
2420-- i.e. enumeration types that have at least one character literal.
2421
a7cadd18 2422-- Is_Checked_Ghost_Entity
c5cec2fe
AC
2423-- Applies to all entities. Set for abstract states, [generic] packages,
2424-- [generic] subprograms, components, discriminants, formal parameters,
2425-- objects, package bodies, subprogram bodies, and [sub]types subject to
2426-- pragma Ghost or inherit "ghostness" from an enclosing construct, and
2427-- subject to Assertion_Policy Ghost => Check.
2428
a7cadd18 2429-- Is_Child_Unit
30ebb114 2430-- Defined in all entities. Set only for defining entities of program
70482933
RK
2431-- units that are child units (but False for subunits).
2432
a7cadd18 2433-- Is_Class_Wide_Equivalent_Type
30ebb114 2434-- Defined in record types and subtypes. Set to True, if the type acts
fbf5a39b
AC
2435-- as a class-wide equivalent type, i.e. the Equivalent_Type field of
2436-- some class-wide subtype entity references this record type.
2437
02886c2e
AC
2438-- Is_Class_Wide_Type (synthesized)
2439-- Applies to all entities, true for class wide types and subtypes
2440
8e1e74a1
JM
2441-- Is_Class_Wide_Wrapper
2442-- Defined in subprogram entities. Indicates that it has been created as
2443-- a wrapper in a generic/instance scenario involving a formal type and
2444-- a generic primitive operation when the actual is a class-wide type.
2445
a7cadd18 2446-- Is_Compilation_Unit
30ebb114 2447-- Defined in all entities. Set if the entity is a package or subprogram
70482933
RK
2448-- entity for a compilation unit other than a subunit (since we treat
2449-- subunits as part of the same compilation operation as the ultimate
2450-- parent, we do not consider them to be separate units for this flag).
2451
a7cadd18 2452-- Is_Completely_Hidden
81a0f4a3
YM
2453-- Defined on discriminants. Only set on stored discriminants of
2454-- untagged types. When set, the entity is a stored discriminant of a
fdce4bb7
JM
2455-- derived untagged type which is not directly visible in the derived
2456-- type because the derived type or one of its ancestors have renamed the
81a0f4a3 2457-- discriminants in the root type. Note: there are stored discriminants
fdce4bb7 2458-- which are not Completely_Hidden (e.g. discriminants of a root type).
70482933
RK
2459
2460-- Is_Composite_Type (synthesized)
3ddfabe3
AC
2461-- Applies to all entities, true for all composite types and subtypes.
2462-- Either Is_Composite_Type or Is_Elementary_Type (but not both) is true
2463-- of any type.
70482933 2464
a7cadd18 2465-- Is_Concurrent_Record_Type
30ebb114 2466-- Defined in record types and subtypes. Set if the type was created
70482933
RK
2467-- by the expander to represent a task or protected type. For every
2468-- concurrent type, such as record type is constructed, and task and
e51102b2 2469-- protected objects are instances of this record type at run time
28bc3323
AC
2470-- (The backend will replace declarations of the concurrent type using
2471-- the declarations of the corresponding record type). See Exp_Ch9 for
2472-- further details.
70482933
RK
2473
2474-- Is_Concurrent_Type (synthesized)
ce0bead3
HK
2475-- Applies to all entities, true for task types and subtypes and for
2476-- protected types and subtypes.
70482933 2477
21d27997
RD
2478-- Is_Constant_Object (synthesized)
2479-- Applies to all entities, true for E_Constant, E_Loop_Parameter, and
2480-- E_In_Parameter entities.
2481
a7cadd18 2482-- Is_Constrained
30ebb114 2483-- Defined in types or subtypes which may have index, discriminant
70482933
RK
2484-- or range constraint (i.e. array types and subtypes, record types
2485-- and subtypes, string types and subtypes, and all numeric types).
2486-- Set if the type or subtype is constrained.
2487
a7cadd18 2488-- Is_Constr_Subt_For_U_Nominal
124092ee 2489-- Defined in all types and subtypes. Set only for the constructed
70482933
RK
2490-- subtype of an object whose nominal subtype is unconstrained. Note
2491-- that the constructed subtype itself will be constrained.
2492
a7cadd18 2493-- Is_Constr_Subt_For_UN_Aliased
30ebb114 2494-- Defined in all types and subtypes. This flag can be set only if
fdce4bb7
JM
2495-- Is_Constr_Subt_For_U_Nominal is also set. It indicates that in
2496-- addition the object concerned is aliased. This flag is used by
28bc3323 2497-- the backend to determine whether a template must be constructed.
70482933 2498
a7cadd18 2499-- Is_Constructor
30ebb114 2500-- Defined in function and procedure entities. Set if a pragma
70482933
RK
2501-- CPP_Constructor applies to the subprogram.
2502
a7cadd18 2503-- Is_Controlled_Active [base type only]
30ebb114 2504-- Defined in all type entities. Indicates that the type is controlled,
70482933
RK
2505-- i.e. is either a descendant of Ada.Finalization.Controlled or of
2506-- Ada.Finalization.Limited_Controlled.
2507
0cb81445
PMR
2508-- Is_Controlled (synth) [base type only]
2509-- Defined in all type entities. Set if Is_Controlled_Active is set for
2510-- the type, and Disable_Controlled is not set.
c8593453 2511
a7cadd18 2512-- Is_Controlling_Formal
30ebb114 2513-- Defined in all Formal_Kind entities. Marks the controlling parameters
70482933
RK
2514-- of dispatching operations.
2515
a7cadd18 2516-- Is_CPP_Class
30ebb114 2517-- Defined in all type entities, set only for tagged types to which a
f937473f 2518-- valid pragma Import (CPP, ...) or pragma CPP_Class has been applied.
70482933 2519
a7cadd18 2520-- Is_CUDA_Kernel
ad1bea3a
AC
2521-- Defined in function and procedure entities. Set if the subprogram is a
2522-- CUDA kernel.
2523
70482933
RK
2524-- Is_Decimal_Fixed_Point_Type (synthesized)
2525-- Applies to all type entities, true for decimal fixed point
2526-- types and subtypes.
2527
a7cadd18 2528-- Is_Descendant_Of_Address
061828e3
AC
2529-- Defined in all entities. True if the entity is type System.Address,
2530-- or (recursively) a subtype or derived type of System.Address.
d5e96bc6 2531
a7cadd18 2532-- Is_DIC_Procedure
f63d601b
HK
2533-- Defined in functions and procedures. Set for a generated procedure
2534-- which verifies the assumption of pragma Default_Initial_Condition at
e51102b2 2535-- run time.
f63d601b 2536
ddc1515a 2537-- Is_Discrete_Or_Fixed_Point_Type (synthesized)
70482933
RK
2538-- Applies to all entities, true for all discrete types and subtypes
2539-- and all fixed-point types and subtypes.
2540
02886c2e
AC
2541-- Is_Discrete_Type (synthesized)
2542-- Applies to all entities, true for all discrete types and subtypes
2543
a7cadd18 2544-- Is_Discrim_SO_Function
30ebb114 2545-- Defined in all entities. Set only in E_Function entities that Layout
70482933
RK
2546-- creates to compute discriminant-dependent dynamic size/offset values.
2547
a7cadd18 2548-- Is_Discriminant_Check_Function
e2ef0ff6
AC
2549-- Defined in all entities. Set only in E_Function entities for functions
2550-- created to do discriminant checks.
2551
21d27997
RD
2552-- Is_Discriminal (synthesized)
2553-- Applies to all entities, true for renamings of discriminants. Such
8398e82e 2554-- entities appear as constants or IN parameters.
21d27997 2555
a7cadd18 2556-- Is_Dispatch_Table_Entity
21d27997
RD
2557-- Applies to all entities. Set to indicate to the backend that this
2558-- entity is associated with a dispatch table.
2559
475e1d24
JM
2560-- Is_Dispatch_Table_Wrapper
2561-- Applies to all entities. Set on wrappers built when the subprogram has
2562-- class-wide preconditions or class-wide postconditions affected by
2563-- overriding (AI12-0195).
2564
a7cadd18 2565-- Is_Dispatching_Operation
124092ee
AC
2566-- Defined in all entities. Set for procedures, functions, generic
2567-- procedures, and generic functions if the corresponding operation
2568-- is dispatching.
70482933
RK
2569
2570-- Is_Dynamic_Scope (synthesized)
2571-- Applies to all Entities. Returns True if the entity is a dynamic
90e491a7
PMR
2572-- scope (i.e. a block, subprogram, task_type, entry or extended return
2573-- statement).
2574
a7cadd18 2575-- Is_Elaboration_Checks_OK_Id
90e491a7 2576-- Defined in elaboration targets (see terminology in Sem_Elab). Set when
587af009 2577-- the target appears in a region which is subject to enabled elaboration
90e491a7
PMR
2578-- checks. Such targets are allowed to generate run-time conditional ABE
2579-- checks or guaranteed ABE failures.
70482933 2580
48688534
HK
2581-- Is_Elaboration_Target (synthesized)
2582-- Applies to all entities, True only for elaboration targets (see the
2583-- terminology in Sem_Elab).
2584
a7cadd18 2585-- Is_Elaboration_Warnings_OK_Id
162ed06f
HK
2586-- Defined in elaboration targets (see terminology in Sem_Elab). Set when
2587-- the target appears in a region with elaboration warnings enabled.
2588
70482933 2589-- Is_Elementary_Type (synthesized)
48688534 2590-- Applies to all entities, True for all elementary types and subtypes.
90e491a7
PMR
2591-- Either Is_Composite_Type or Is_Elementary_Type (but not both) is true
2592-- of any type.
70482933 2593
a7cadd18 2594-- Is_Eliminated
30ebb114 2595-- Defined in type entities, subprogram entities, and object entities.
70482933 2596-- Indicates that the corresponding entity has been eliminated by use
07fc65c4
GB
2597-- of pragma Eliminate. Also used to mark subprogram entities whose
2598-- declaration and body are within unreachable code that is removed.
70482933 2599
70482933
RK
2600-- Is_Entry (synthesized)
2601-- Applies to all entities, True only for entry and entry family
2602-- entities and False for all other entity kinds.
2603
a7cadd18 2604-- Is_Entry_Formal
124092ee
AC
2605-- Defined in all entities. Set only for entry formals (which can only
2606-- be in, in-out or out parameters). This flag is used to speed up the
2607-- test for the need to replace references in Exp_Ch2.
70482933 2608
a7cadd18 2609-- Is_Entry_Wrapper
337c80a6
JM
2610-- Defined on wrappers created for entries that have precondition or
2611-- postcondition aspects.
5e127570 2612
02886c2e
AC
2613-- Is_Enumeration_Type (synthesized)
2614-- Defined in all entities, true for enumeration types and subtypes
2615
a7cadd18 2616-- Is_Exception_Handler
75a957f5
AC
2617-- Defined in blocks. Set if the block serves only as a scope of an
2618-- exception handler with a choice parameter. Such a block does not
2619-- physically appear in the tree.
2620
a7cadd18 2621-- Is_Exported
30ebb114 2622-- Defined in all entities. Set if the entity is exported. For now we
70482933
RK
2623-- only allow the export of constants, exceptions, functions, procedures
2624-- and variables, but that may well change later on. Exceptions can only
535a8637 2625-- be exported in the Java VM implementation of GNAT, which is retired.
70482933 2626
aa500b7a
AC
2627-- Is_External_State (synthesized)
2628-- Applies to all entities, true for abstract states that are subject to
bcc093dc 2629-- option External or Synchronous.
aa500b7a 2630
a7cadd18 2631-- Is_Finalized_Transient
937e9676
AC
2632-- Defined in constants, loop parameters of generalized iterators, and
2633-- variables. Set when a transient object has been finalized by one of
2634-- the transient finalization mechanisms. The flag prevents the double
2635-- finalization of the object.
2636
df3e68b1
HK
2637-- Is_Finalizer (synthesized)
2638-- Applies to all entities, true for procedures containing finalization
2639-- code to process local or library level objects.
2640
a7cadd18 2641-- Is_First_Subtype
30ebb114 2642-- Defined in all entities. True for first subtypes (RM 3.2.1(6)),
70482933
RK
2643-- i.e. the entity in the type declaration that introduced the type.
2644-- This may be the base type itself (e.g. for record declarations and
2645-- enumeration type declarations), or it may be the first subtype of
2646-- an anonymous base type (e.g. for integer type declarations or
2647-- constrained array declarations).
2648
d32db3a7
GD
2649-- Is_Fixed_Lower_Bound_Array_Subtype
2650-- Defined in type entities. True for unconstrained array types and
2651-- subtypes where at least one index has a range specified with a fixed
2652-- lower bound (range syntax is "<expression> .. <>").
2653
2654-- Is_Fixed_Lower_Bound_Index_Subtype
2655-- Defined in type entities. True for an index of an unconstrained array
2656-- type or subtype whose range is specified with a fixed lower bound
2657-- (range syntax is "<expression> .. <>").
2658
70482933
RK
2659-- Is_Fixed_Point_Type (synthesized)
2660-- Applies to all entities, true for decimal and ordinary fixed
4ef36ac7 2661-- point types and subtypes.
70482933
RK
2662
2663-- Is_Floating_Point_Type (synthesized)
2664-- Applies to all entities, true for float types and subtypes
2665
2666-- Is_Formal (synthesized)
2667-- Applies to all entities, true for IN, IN OUT and OUT parameters
2668
6e443c90
RD
2669-- Is_Formal_Object (synthesized)
2670-- Applies to all entities, true for generic IN and IN OUT parameters
2671
a7cadd18 2672-- Is_Formal_Subprogram
30ebb114 2673-- Defined in all entities. Set for generic formal subprograms.
70482933 2674
a7cadd18 2675-- Is_Frozen
30ebb114 2676-- Defined in all type and subtype entities. Set if type or subtype has
fdce4bb7 2677-- been frozen.
70482933 2678
a7cadd18 2679-- Is_Generic_Actual_Subprogram
fce54763
AC
2680-- Defined on functions and procedures. Set on the entity of the renaming
2681-- declaration created within an instance for an actual subprogram.
2682-- Used to generate constraint checks on calls to these subprograms, even
2683-- within an instance of a predefined run-time unit, in which checks
2684-- are otherwise suppressed.
fce54763 2685
a7cadd18 2686-- Is_Generic_Actual_Type
30ebb114 2687-- Defined in all type and subtype entities. Set in the subtype
fdce4bb7
JM
2688-- declaration that renames the generic formal as a subtype of the
2689-- actual. Guarantees that the subtype is not static within the instance.
aa499784
ES
2690-- Also used during analysis of an instance, to simplify resolution of
2691-- accidental overloading that occurs when different formal types get the
2692-- same actual.
70482933 2693
a7cadd18 2694-- Is_Generic_Instance
30ebb114 2695-- Defined in all entities. Set to indicate that the entity is an
6e443c90
RD
2696-- instance of a generic unit, or a formal package (which is an instance
2697-- of the template).
70482933 2698
fbf5a39b
AC
2699-- Is_Generic_Subprogram (synthesized)
2700-- Applies to all entities. Yields True for a generic subprogram
2701-- (generic function, generic subprogram), False for all other entities.
2702
a7cadd18 2703-- Is_Generic_Type
30ebb114 2704-- Defined in all entities. Set for types which are generic formal types.
93c3fca7 2705-- Such types have an Ekind that corresponds to their classification, so
22243c12 2706-- the Ekind cannot be used to identify generic formal types.
70482933
RK
2707
2708-- Is_Generic_Unit (synthesized)
2709-- Applies to all entities. Yields True for a generic unit (generic
2710-- package, generic function, generic procedure), and False for all
2711-- other entities.
2712
95fef24f
AC
2713-- Is_Ghost_Entity (synthesized)
2714-- Applies to all entities. Yields True for abstract states, [generic]
2715-- packages, [generic] subprograms, components, discriminants, formal
2716-- parameters, objects, package bodies, subprogram bodies, and [sub]types
057aa8d8 2717-- subject to pragma Ghost or those that inherit the Ghost property from
95fef24f
AC
2718-- an enclosing construct.
2719
a7cadd18 2720-- Is_Hidden
124092ee 2721-- Defined in all entities. Set for all entities declared in the
70482933
RK
2722-- private part or body of a package. Also marks generic formals of a
2723-- formal package declared without a box. For library level entities,
b7d5e87b
AC
2724-- this flag is set if the entity is not publicly visible. This flag
2725-- is reset when compiling the body of the package where the entity
2726-- is declared, when compiling the private part or body of a public
2727-- child unit, and when compiling a private child unit (see Install_
2728-- Private_Declaration in sem_ch7).
70482933 2729
a7cadd18 2730-- Is_Hidden_Non_Overridden_Subpgm
79859568
AC
2731-- Defined in all entities. Set for implicitly declared subprograms
2732-- that require overriding or are null procedures, and are hidden by
2733-- a non-fully conformant homograph with the same characteristics
09c954dc
AC
2734-- (Ada RM 8.3 12.3/2).
2735
a7cadd18 2736-- Is_Hidden_Open_Scope
124092ee 2737-- Defined in all entities. Set for a scope that contains the
70482933
RK
2738-- instantiation of a child unit, and whose entities are not visible
2739-- during analysis of the instance.
2740
a7cadd18 2741-- Is_Ignored_Ghost_Entity
c5cec2fe
AC
2742-- Applies to all entities. Set for abstract states, [generic] packages,
2743-- [generic] subprograms, components, discriminants, formal parameters,
2744-- objects, package bodies, subprogram bodies, and [sub]types subject to
2745-- pragma Ghost or inherit "ghostness" from an enclosing construct, and
2746-- subject to Assertion_Policy Ghost => Ignore.
2747
a7cadd18 2748-- Is_Ignored_Transient
937e9676
AC
2749-- Defined in constants, loop parameters of generalized iterators, and
2750-- variables. Set when a transient object must be processed by one of
2751-- the transient finalization mechanisms. Once marked, a transient is
2752-- intentionally ignored by the general finalization mechanism because
2753-- its clean up actions are context specific.
2754
a7cadd18 2755-- Is_Immediately_Visible
30ebb114 2756-- Defined in all entities. Set if entity is immediately visible, i.e.
70482933
RK
2757-- is defined in some currently open scope (RM 8.3(4)).
2758
a7cadd18 2759-- Is_Implementation_Defined
30ebb114 2760-- Defined in all entities. Set if a pragma Implementation_Defined is
df177175
RD
2761-- applied to the pragma. Used to mark all implementation defined
2762-- identifiers in standard library packages, and to implement the
2763-- restriction No_Implementation_Identifiers.
2764
a7cadd18 2765-- Is_Imported
30ebb114 2766-- Defined in all entities. Set if the entity is imported. For now we
d7cc5f0e
PMR
2767-- only allow the import of exceptions, functions, procedures, packages,
2768-- constants, and variables. Exceptions, packages, and types can only be
2769-- imported in the Java VM implementation, which is retired.
70482933
RK
2770
2771-- Is_Incomplete_Or_Private_Type (synthesized)
2772-- Applies to all entities, true for private and incomplete types
2773
6e443c90
RD
2774-- Is_Incomplete_Type (synthesized)
2775-- Applies to all entities, true for incomplete types and subtypes
2776
a7cadd18 2777-- Is_Independent
a517d6c1
EB
2778-- Defined in all types and objects. Set if a valid pragma or aspect
2779-- Independent applies to the entity, or for a component if a valid
2780-- pragma or aspect Independent_Components applies to the enclosing
2781-- record type. Also set if a pragma Shared or pragma Atomic applies to
2782-- the entity, or if the declaration of the entity carries the Aliased
2783-- keyword. For Ada 2012, also applies to formal parameters. In the
2784-- case of private and incomplete types, this flag is set in both the
2785-- partial view and the full view.
40f4dbbe 2786
a7cadd18 2787-- Is_Initial_Condition_Procedure
90e491a7
PMR
2788-- Defined in functions and procedures. Set for a generated procedure
2789-- which verifies the assumption of pragma Initial_Condition at run time.
2790
a7cadd18 2791-- Is_Inlined
30ebb114 2792-- Defined in all entities. Set for functions and procedures which are
70482933
RK
2793-- to be inlined. For subprograms created during expansion, this flag
2794-- may be set directly by the expander to request inlining. Also set
2795-- for packages that contain inlined subprograms, whose bodies must be
2796-- be compiled. Is_Inlined is also set on generic subprograms and is
2797-- inherited by their instances. It is also set on the body entities
2798-- of inlined subprograms. See also Has_Pragma_Inline.
4bd4bb7f 2799
a7cadd18 2800-- Is_Inlined_Always
4bd4bb7f
AC
2801-- Defined in subprograms. Set for functions and procedures which are
2802-- always inlined in GNATprove mode. GNATprove uses this flag to know
2803-- when a body does not need to be analyzed. The value of this flag is
2804-- only meaningful if Body_To_Inline is not Empty for the subprogram.
52c1498c 2805
a7cadd18 2806-- Is_Instantiated
30ebb114 2807-- Defined in generic packages and generic subprograms. Set if the unit
70482933
RK
2808-- is instantiated from somewhere in the extended main source unit. This
2809-- flag is used to control warnings about the unit being uninstantiated.
2810-- Also set in a package that is used as an actual for a generic package
2811-- formal in an instantiation. Also set on a parent instance, in the
2812-- instantiation of a child, which is implicitly declared in the parent.
2813
2814-- Is_Integer_Type (synthesized)
2815-- Applies to all entities, true for integer types and subtypes
2816
a7cadd18 2817-- Is_Interface
30ebb114 2818-- Defined in record types and subtypes. Set to indicate that the current
b2c3160c
AC
2819-- entity corresponds to an abstract interface. Because abstract
2820-- interfaces are conceptually a special kind of abstract tagged type
a9d8907c
JM
2821-- we represent them by means of tagged record types and subtypes
2822-- marked with this attribute. This allows us to reuse most of the
2823-- compiler support for abstract tagged types to implement interfaces
2824-- (Ada 2005: AI-251).
2825
a7cadd18 2826-- Is_Internal
30ebb114 2827-- Defined in all entities. Set to indicate an entity created during
edd63e9b 2828-- semantic processing (e.g. an implicit type, or a temporary). The
ce0bead3
HK
2829-- current uses of this flag are:
2830--
2831-- 1) Internal entities (such as temporaries generated for the result
2832-- of an inlined function call or dummy variables generated for the
2833-- debugger). Set to indicate that they need not be initialized, even
8f8f531f 2834-- when scalars are initialized or normalized.
ce0bead3
HK
2835--
2836-- 2) Predefined primitives of tagged types. Set to mark that they
2837-- have specific properties: first they are primitives even if they
2838-- are not defined in the type scope (the freezing point is not
2839-- necessarily in the same scope), and second the predefined equality
2840-- can be overridden by a user-defined equality, no body will be
2841-- generated in this case.
2842--
2843-- 3) Object declarations generated by the expander that are implicitly
2844-- imported or exported so that they can be marked in Sprint output.
2845--
ce2b6ba5
JM
2846-- 4) Internal entities in the list of primitives of tagged types that
2847-- are used to handle secondary dispatch tables. These entities have
2848-- also the attribute Interface_Alias.
383e179e 2849
a7cadd18 2850-- Is_Interrupt_Handler
30ebb114 2851-- Defined in procedures. Set if a pragma Interrupt_Handler applies
9324e07d
BD
2852-- to the procedure. The procedure must be a parameterless protected
2853-- procedure.
70482933 2854
a7cadd18 2855-- Is_Intrinsic_Subprogram
30ebb114 2856-- Defined in functions and procedures. It is set if a valid pragma
5a527952
AC
2857-- Interface or Import is present for this subprogram specifying
2858-- convention Intrinsic. Valid means that the name and profile of the
2859-- subprogram match the requirements of one of the recognized intrinsic
2860-- subprograms (see package Sem_Intr for details). Note: the value of
2861-- Convention for such an entity will be set to Convention_Intrinsic,
2862-- but it is the setting of Is_Intrinsic_Subprogram, NOT simply having
2863-- convention set to intrinsic, which causes intrinsic code to be
2864-- generated.
70482933 2865
a7cadd18 2866-- Is_Invariant_Procedure
00c93ba2 2867-- Defined in functions and procedures. Set for a generated invariant
3ddfabe3
AC
2868-- procedure which verifies the invariants of both the partial and full
2869-- views of a private type or private extension as well as any inherited
2870-- class-wide invariants from parent types or interfaces.
fc142f63 2871
a7cadd18 2872-- Is_Itype
30ebb114 2873-- Defined in all entities. Set to indicate that a type is an Itype,
fdce4bb7 2874-- which means that the declaration for the type does not appear
28bc3323
AC
2875-- explicitly in the tree. Instead the backend will elaborate the type
2876-- when it is first used. Has_Delayed_Freeze can be set for Itypes, and
2877-- the meaning is that the first use (the one which causes the type to be
fdce4bb7
JM
2878-- defined) will be the freeze node. Note that an important restriction
2879-- on Itypes is that the first use of such a type (the one that causes it
2880-- to be defined) must be in the same scope as the type.
70482933 2881
a7cadd18 2882-- Is_Known_Non_Null
124092ee 2883-- Defined in all entities. Relevant (and can be set) only for
fbf5a39b
AC
2884-- objects of an access type. It is set if the object is currently
2885-- known to have a non-null value (meaning that no access checks
8a36a0cc 2886-- are needed). The indication can for example come from assignment
ba673907 2887-- of an access parameter or an allocator whose value is known non-null.
fbf5a39b
AC
2888--
2889-- Note: this flag is set according to the sequential flow of the
124092ee
AC
2890-- program, watching the current value of the variable. However, this
2891-- processing can miss cases of changing the value of an aliased or
2892-- constant object, so even if this flag is set, it should not be
2893-- believed if the variable is aliased or volatile. It would be a
2894-- little neater to avoid the flag being set in the first place in
2895-- such cases, but that's trickier, and there is only one place that
2896-- tests the value anyway.
fbf5a39b
AC
2897--
2898-- The flag is dynamically set and reset as semantic analysis and
2899-- expansion proceeds. Its value is meaningless once the tree is
2900-- fully constructed, since it simply indicates the last state.
28bc3323 2901-- Thus this flag has no meaning to the backend.
fbf5a39b 2902
a7cadd18 2903-- Is_Known_Null
124092ee 2904-- Defined in all entities. Relevant (and can be set ) only for
ba673907
JM
2905-- objects of an access type. It is set if the object is currently known
2906-- to have a null value (meaning that a dereference will surely raise
2907-- constraint error exception). The indication can come from an
2908-- assignment or object declaration.
2909--
2910-- The comments above about sequential flow and aliased and volatile for
2911-- the Is_Known_Non_Null flag apply equally to the Is_Known_Null flag.
2912
a7cadd18 2913-- Is_Known_Valid
30ebb114 2914-- Defined in all entities. Relevant for types (and subtype) and
70482933
RK
2915-- for objects (and enumeration literals) of a discrete type.
2916--
2917-- The purpose of this flag is to implement the requirement stated
2918-- in (RM 13.9.1(9-11)) which require that the use of possibly invalid
2919-- values may not cause programs to become erroneous. See the function
47cb314a 2920-- Checks.Expr_Known_Valid for further details. Note that the setting
70482933
RK
2921-- is conservative, in the sense that if the flag is set, it must be
2922-- right. If the flag is not set, nothing is known about the validity.
2923--
2924-- For enumeration literals, the flag is always set, since clearly
2925-- an enumeration literal represents a valid value. Range checks
2926-- where necessary will ensure that this valid value is appropriate.
2927--
2928-- For objects, the flag indicates the state of knowledge about the
2929-- current value of the object. This may be modified during expansion,
28bc3323 2930-- and thus the final value is not relevant to the backend.
70482933
RK
2931--
2932-- For types and subtypes, the flag is set if all possible bit patterns
2933-- of length Object_Size (i.e. Esize of the type) represent valid values
95872381 2934-- of the type. In general for such types, all values are valid, the
70482933
RK
2935-- only exception being the case where an object of the type has an
2936-- explicit size that is greater than Object_Size.
2937--
2938-- For non-discrete objects, the setting of the Is_Known_Valid flag is
2939-- not defined, and is not relevant, since the considerations of the
2940-- requirement in (RM 13.9.1(9-11)) do not apply.
fbf5a39b
AC
2941--
2942-- The flag is dynamically set and reset as semantic analysis and
2943-- expansion proceeds. Its value is meaningless once the tree is
2944-- fully constructed, since it simply indicates the last state.
28bc3323 2945-- Thus this flag has no meaning to the backend.
70482933 2946
a7cadd18 2947-- Is_Limited_Composite
30ebb114 2948-- Defined in all entities. Set for composite types that have a limited
c0b11850
AC
2949-- component. Used to enforce the rule that operations on the composite
2950-- type that depend on the full view of the component do not become
2951-- visible until the immediate scope of the composite type itself
2952-- (RM 7.3.1 (5)).
70482933 2953
a7cadd18 2954-- Is_Limited_Interface
30ebb114 2955-- Defined in record types and subtypes. True for interface types, if
0a36105d
JM
2956-- interface is declared limited, task, protected, or synchronized, or
2957-- is derived from a limited interface.
f4d379b8 2958
a7cadd18 2959-- Is_Limited_Record
30ebb114 2960-- Defined in all entities. Set to true for record (sub)types if the
70482933
RK
2961-- record is declared to be limited. Note that this flag is not set
2962-- simply because some components of the record are limited.
2963
a7cadd18 2964-- Is_Local_Anonymous_Access
30ebb114 2965-- Defined in access types. Set for an anonymous access type to indicate
ce0bead3 2966-- that the type is created for a record component with an access
885c4871 2967-- definition, an array component, or (pre-Ada 2012) a standalone object.
d15f9422 2968-- Such anonymous types have an accessibility level equal to that of the
ce0bead3 2969-- declaration in which they appear, unlike the anonymous access types
d15f9422 2970-- that are created for access parameters, access discriminants, and
885c4871 2971-- (as of Ada 2012) stand-alone objects.
ce0bead3 2972
a7cadd18 2973-- Is_Loop_Parameter
5a0c86bd
BD
2974-- Applies to all entities. Certain loops, in particular "for ... of"
2975-- loops, get transformed so that the loop parameter is declared by a
2976-- variable declaration, so the entity is an E_Variable. This is True for
2977-- such E_Variables; False otherwise.
2978
a7cadd18 2979-- Is_Machine_Code_Subprogram
30ebb114 2980-- Defined in subprogram entities. Set to indicate that the subprogram
70482933
RK
2981-- is a machine code subprogram (i.e. its body includes at least one
2982-- code statement). Also indicates that all necessary semantic checks
fbf5a39b
AC
2983-- as required by RM 13.8(3) have been performed.
2984
2985-- Is_Modular_Integer_Type (synthesized)
2986-- Applies to all entities. True if entity is a modular integer type
70482933 2987
a7cadd18 2988-- Is_Non_Static_Subtype
30ebb114 2989-- Defined in all type and subtype entities. It is set in some (but not
fdce4bb7
JM
2990-- all) cases in which a subtype is known to be non-static. Before this
2991-- flag was added, the computation of whether a subtype was static was
2992-- entirely synthesized, by looking at the bounds, and the immediate
2993-- subtype parent. However, this method does not work for some Itypes
2994-- that have no parent set (and the only way to find the immediate
3b1d4d82 2995-- subtype parent is to go through the tree). For now, this flag is set
70482933
RK
2996-- conservatively, i.e. if it is set then for sure the subtype is non-
2997-- static, but if it is not set, then the type may or may not be static.
fdce4bb7
JM
2998-- Thus the test for a static subtype is that this flag is clear AND that
2999-- the bounds are static AND that the parent subtype (if available to be
3000-- tested) is static. Eventually we should make sure this flag is always
3001-- set right, at which point, these comments can be removed, and the
3002-- tests for static subtypes greatly simplified.
70482933 3003
a7cadd18 3004-- Is_Null_Init_Proc
30ebb114 3005-- Defined in procedure entities. Set for generated init proc procedures
70482933
RK
3006-- (used to initialize composite types), if the code for the procedure
3007-- is null (i.e. is a return and nothing else). Such null initialization
3008-- procedures are generated in case some client is compiled using the
3009-- Initialize_Scalars pragma, generating a call to this null procedure,
3010-- but there is no need to call such procedures within a compilation
3011-- unit, and this flag is used to suppress such calls.
3012
cf6956bb
AC
3013-- Is_Null_State (synthesized)
3014-- Applies to all entities, true for an abstract state declared with
3015-- keyword null.
3016
70482933
RK
3017-- Is_Numeric_Type (synthesized)
3018-- Applies to all entities, true for all numeric types and subtypes
3019-- (integer, fixed, float).
3020
3021-- Is_Object (synthesized)
3022-- Applies to all entities, true for entities representing objects,
3023-- including generic formal parameters.
3024
a7cadd18 3025-- Is_Obsolescent
d3ef4bd6
AC
3026-- Defined in all entities. Set for any entity to which a valid pragma
3027-- or aspect Obsolescent applies.
82c80734 3028
a7cadd18 3029-- Is_Only_Out_Parameter
30ebb114 3030-- Defined in formal parameter entities. Set if this parameter is the
ce0bead3
HK
3031-- only OUT parameter for this formal part. If there is more than one
3032-- out parameter, or if there is some other IN OUT parameter then this
3033-- flag is not set in any of them. Used in generation of warnings.
3034
70482933 3035-- Is_Ordinary_Fixed_Point_Type (synthesized)
9d77af56
RD
3036-- Applies to all entities, true for ordinary fixed point types and
3037-- subtypes.
70482933 3038
a7cadd18 3039-- Is_Package_Body_Entity
30ebb114 3040-- Defined in all entities. Set for entities defined at the top level
70482933
RK
3041-- of a package body. Used to control externally generated names.
3042
02886c2e
AC
3043-- Is_Package_Or_Generic_Package (synthesized)
3044-- Applies to all entities. True for packages and generic packages.
3045-- False for all other entities.
3046
a7cadd18 3047-- Is_Packed [implementation base type only]
30ebb114 3048-- Defined in all type entities. This flag is set only for record and
b3f75672
EB
3049-- array types which have a packed representation. There are four cases
3050-- which cause packing:
3051--
3052-- 1. Explicit use of pragma Pack to pack a record.
3053-- 2. Explicit use of pragma Pack to pack an array.
3054-- 3. Setting Component_Size of an array to a packable value.
3055-- 4. Indexing an array with a non-standard enumeration type.
3056--
3057-- For records, Is_Packed is always set if Has_Pragma_Pack is set, and
3058-- can also be set on its own in a derived type which inherited its
3059-- packed status.
3060--
3061-- For arrays, Is_Packed is set if either Has_Pragma_Pack is set and the
3062-- component size is either not known at compile time or known but not
3063-- 8/16/32/64 bits, or a Component_Size clause exists and the specified
3064-- value is smaller than 64 bits but not 8/16/32, or if the array has one
3065-- or more index types that are enumeration types with a non-standard
3066-- representation (in GNAT, we store such arrays compactly, using the Pos
3067-- of the enumeration type value). As for the case of records, Is_Packed
3068-- can be set on its own for a derived type.
3069
70482933 3070-- Before an array type is frozen, Is_Packed will always be set if
40f07b4b 3071-- Has_Pragma_Pack is set. Before the freeze point, it is not possible
70482933
RK
3072-- to know the component size, since the component type is not frozen
3073-- until the array type is frozen. Thus Is_Packed for an array type
3074-- before it is frozen means that packed is required. Then if it turns
b3f75672
EB
3075-- out that the component size doesn't require packing, the Is_Packed
3076-- flag gets turned off.
70482933 3077
6186a6ef
EB
3078-- In the bit-packed array case (i.e. the component size is known by the
3079-- front end and is in the range 1-63 but not a multiple of 8), then the
3080-- Is_Bit_Packed_Array flag will be set once the array type is frozen.
b3f75672 3081--
8b034336
AC
3082-- Is_Packed_Array (synth)
3083-- Applies to all entities, true if entity is for a packed array.
3084
a7cadd18 3085-- Is_Packed_Array_Impl_Type
30ebb114 3086-- Defined in all entities. This flag is set on the entity for the type
b3f75672 3087-- used to implement a packed array (either a modular type or a subtype
607114db 3088-- of Packed_Bytes{1,2,4} in the bit-packed array case, a regular array
b3f75672 3089-- in the non-standard enumeration index case). It is set if and only
8ca597af 3090-- if the type appears in the Packed_Array_Impl_Type field of some other
b3f75672 3091-- entity. It is used by the back end to activate the special processing
28bc3323 3092-- for such types (unchecked conversions that would not otherwise be
8ca597af
RD
3093-- allowed are allowed for such types). If Is_Packed_Array_Impl_Type is
3094-- set in an entity, then the Original_Array_Type field of this entity
3095-- points to the array type for which this is the Packed_Array_Impl_Type.
70482933 3096
a7cadd18 3097-- Is_Param_Block_Component_Type [base type only]
b54d1d39
AC
3098-- Defined in access types. Set to indicate that a type is the type of a
3099-- component of the parameter block record type generated by the compiler
3100-- for an entry or a select statement. Read by CodePeer.
3101
a7cadd18 3102-- Is_Partial_Invariant_Procedure
3ddfabe3
AC
3103-- Defined in functions and procedures. Set for a generated invariant
3104-- procedure which verifies the invariants of the partial view of a
3105-- private type or private extension.
3106
a7cadd18 3107-- Is_Potentially_Use_Visible
30ebb114 3108-- Defined in all entities. Set if entity is potentially use visible,
70482933
RK
3109-- i.e. it is defined in a package that appears in a currently active
3110-- use clause (RM 8.4(8)). Note that potentially use visible entities
3111-- are not necessarily use visible (RM 8.4(9-11)).
3112
a7cadd18 3113-- Is_Predicate_Function
fc142f63
AC
3114-- Present in functions and procedures. Set for generated predicate
3115-- functions.
3116
a7cadd18 3117-- Is_Preelaborated
30ebb114 3118-- Defined in all entities, set in E_Package and E_Generic_Package
70482933
RK
3119-- entities to which a pragma Preelaborate is applied, and also in
3120-- all entities within such packages. Note that the fact that this
587af009 3121-- flag is set does not necessarily mean that no elaboration code is
70482933
RK
3122-- generated for the package.
3123
a7cadd18 3124-- Is_Primitive
30ebb114 3125-- Defined in overloadable entities and in generic subprograms. Set to
9d77af56 3126-- indicate that this is a primitive operation of some type, which may
7c0c194b 3127-- be a tagged type or an untagged type. Used to verify overriding
5d37ba92
ES
3128-- indicators in bodies.
3129
a7cadd18 3130-- Is_Primitive_Wrapper
30ebb114 3131-- Defined in functions and procedures created by the expander to serve
d44202ba
HK
3132-- as an indirection mechanism to overriding primitives of concurrent
3133-- types, entries and protected procedures.
10b93b2e 3134
21d27997
RD
3135-- Is_Prival (synthesized)
3136-- Applies to all entities, true for renamings of private protected
3137-- components. Such entities appear as constants or variables.
3138
a7cadd18 3139-- Is_Private_Composite
30ebb114 3140-- Defined in composite types that have a private component. Used to
70482933 3141-- enforce the rule that operations on the composite type that depend
d9e0a587 3142-- on the full view of the component, do not become visible until the
70482933
RK
3143-- immediate scope of the composite type itself (7.3.1 (5)). Both this
3144-- flag and Is_Limited_Composite are needed.
3145
a7cadd18 3146-- Is_Private_Descendant
30ebb114 3147-- Defined in entities that can represent library units (packages,
70482933 3148-- functions, procedures). Set if the library unit is itself a private
d9d25d04 3149-- child unit, or if it is the descendant of a private child unit.
70482933 3150
a7cadd18 3151-- Is_Private_Primitive
30ebb114 3152-- Defined in subprograms. Set if the operation is a primitive of a
b7d5e87b
AC
3153-- tagged type (procedure or function dispatching on result) whose
3154-- full view has not been seen. Used in particular for primitive
3155-- subprograms of a synchronized type declared between the two views
3156-- of the type, so that the wrapper built for such a subprogram can
3157-- be given the proper signature.
d44202ba 3158
70482933
RK
3159-- Is_Private_Type (synthesized)
3160-- Applies to all entities, true for private types and subtypes,
4ef36ac7 3161-- as well as for record with private types as subtypes.
70482933 3162
21d27997
RD
3163-- Is_Protected_Component (synthesized)
3164-- Applicable to all entities, true if the entity denotes a private
3165-- component of a protected type.
3166
9e9df9da 3167-- Is_Protected_Interface (synthesized)
30ebb114 3168-- Defined in types that are interfaces. True if interface is declared
f4d379b8
HK
3169-- protected, or is derived from protected interfaces.
3170
02886c2e
AC
3171-- Is_Protected_Record_Type (synthesized)
3172-- Applies to all entities, true if Is_Concurrent_Record_Type is true and
3173-- Corresponding_Concurrent_Type is a protected type.
3174
70482933
RK
3175-- Is_Protected_Type (synthesized)
3176-- Applies to all entities, true for protected types and subtypes
3177
a7cadd18 3178-- Is_Public
30ebb114 3179-- Defined in all entities. Set to indicate that an entity defined in
70482933 3180-- one compilation unit can be referenced from other compilation units.
e0c23ac7 3181-- If this reference causes a reference in the generated code, for
28bc3323
AC
3182-- example in the case of a variable name, then the backend will generate
3183-- an appropriate external name for use by the linker.
70482933 3184
a7cadd18 3185-- Is_Pure
30ebb114 3186-- Defined in all entities. Set in all entities of a unit to which a
3e247e58 3187-- pragma Pure is applied except for non-intrinsic imported subprograms,
2db5b47e
AC
3188-- and also set for the entity of the unit itself. In addition, this
3189-- flag may be set for any other functions or procedures that are known
3190-- to be side effect free, so in the case of subprograms, the Is_Pure
3191-- flag may be used by the optimizer to imply that it can assume freedom
3e752e1f
EB
3192-- from side effects (other than those resulting from assignment to Out
3193-- or In Out parameters, or to objects designated by access parameters).
70482933 3194
a7cadd18 3195-- Is_Pure_Unit_Access_Type
30ebb114 3196-- Defined in access type and subtype entities. Set if the type or
edd63e9b
ES
3197-- subtype appears in a pure unit. Used to give an error message at
3198-- freeze time if the access type has a storage pool.
3199
a7cadd18 3200-- Is_RACW_Stub_Type
30ebb114 3201-- Defined in all types, true for the stub types generated for remote
685094bf
RD
3202-- access-to-class-wide types.
3203
a7cadd18 3204-- Is_Raised
30ebb114 3205-- Defined in exception entities. Set if the entity is referenced by a
21d27997 3206-- a raise statement.
d5e96bc6 3207
70482933
RK
3208-- Is_Real_Type (synthesized)
3209-- Applies to all entities, true for real types and subtypes
3210
3211-- Is_Record_Type (synthesized)
3212-- Applies to all entities, true for record types and subtypes,
4ef36ac7 3213-- includes class-wide types and subtypes (which are also records).
70482933 3214
e577151d
PT
3215-- Is_Relaxed_Initialization_State (synthesized)
3216-- Applies to all entities, true for abstract states that are subject to
3217-- option Relaxed_Initialization.
3218
a7cadd18 3219-- Is_Remote_Call_Interface
30ebb114 3220-- Defined in all entities. Set in E_Package and E_Generic_Package
30783513 3221-- entities to which a pragma Remote_Call_Interface is applied, and
685094bf 3222-- also on entities declared in the visible part of such a package.
70482933 3223
a7cadd18 3224-- Is_Remote_Types
30ebb114 3225-- Defined in all entities. Set in E_Package and E_Generic_Package
685094bf
RD
3226-- entities to which a pragma Remote_Types is applied, and also on
3227-- entities declared in the visible part of the spec of such a package.
22243c12
RD
3228-- Also set for types which are generic formal types to which the
3229-- pragma Remote_Access_Type applies.
70482933 3230
a7cadd18 3231-- Is_Renaming_Of_Object
30ebb114 3232-- Defined in all entities, set only for a variable or constant for
70482933
RK
3233-- which the Renamed_Object field is non-empty and for which the
3234-- renaming is handled by the front end, by macro substitution of
587af009 3235-- a copy of the (evaluated) name tree wherever the variable is used.
70482933 3236
a7cadd18 3237-- Is_Return_Object
30ebb114 3238-- Defined in all object entities. True if the object is the return
6e443c90 3239-- object of an extended_return_statement; False otherwise.
70482933 3240
a7cadd18 3241-- Is_Safe_To_Reevaluate
30ebb114 3242-- Defined in all entities. Set in variables that are initialized by
273adcdf
AC
3243-- means of an assignment statement. When initialized their contents
3244-- never change and hence they can be seen by the backend as constants.
3245-- See also Is_True_Constant.
3246
70482933
RK
3247-- Is_Scalar_Type (synthesized)
3248-- Applies to all entities, true for scalar types and subtypes
3249
a7cadd18 3250-- Is_Shared_Passive
30ebb114 3251-- Defined in all entities. Set in E_Package and E_Generic_Package
70482933
RK
3252-- entities to which a pragma Shared_Passive is applied, and also in
3253-- all entities within such packages.
3254
21d27997
RD
3255-- Is_Standard_Character_Type (synthesized)
3256-- Applies to all entities, true for types and subtypes whose root type
bc3c2eca 3257-- is one of the standard character types (Character, Wide_Character, or
21d27997
RD
3258-- Wide_Wide_Character).
3259
bc3c2eca
AC
3260-- Is_Standard_String_Type (synthesized)
3261-- Applies to all entities, true for types and subtypes whose root
3262-- type is one of the standard string types (String, Wide_String, or
3263-- Wide_Wide_String).
3264
a7cadd18 3265-- Is_Static_Type
f8dae9bb
AC
3266-- Defined in entities. Only set for (sub)types. If set, indicates that
3267-- the type is known to be a static type (defined as a discrete type with
5a271a7f
RD
3268-- static bounds, a record all of whose component types are static types,
3269-- or an array, all of whose bounds are of a static type, and also have
aaeb3b3a 3270-- a component type that is a static type). See Set_Uplevel_Type for more
535a8637 3271-- information on how this flag is used.
5a271a7f 3272
a7cadd18 3273-- Is_Statically_Allocated
124092ee 3274-- Defined in all entities. This can only be set for exception,
70482933
RK
3275-- variable, constant, and type/subtype entities. If the flag is set,
3276-- then the variable or constant must be allocated statically rather
3277-- than on the local stack frame. For exceptions, the meaning is that
3278-- the exception data should be allocated statically (and indeed this
3279-- flag is always set for exceptions, since exceptions do not have
3280-- local scope). For a type, the meaning is that the type must be
3281-- elaborated at the global level rather than locally. No type marked
3282-- with this flag may depend on a local variable, or on any other type
3283-- which does not also have this flag set to True. For a variable or
3284-- or constant, if the flag is set, then the type of the object must
3285-- either be declared at the library level, or it must also have the
e14c931f 3286-- flag set (since to allocate the object statically, its type must
70482933
RK
3287-- also be elaborated globally).
3288
70482933
RK
3289-- Is_String_Type (synthesized)
3290-- Applies to all type entities. Determines if the given type is a
3291-- string type, i.e. it is directly a string type or string subtype,
3292-- or a string slice type, or an array type with one dimension and a
3293-- component type that is a character type.
3294
21d27997
RD
3295-- Is_Subprogram (synthesized)
3296-- Applies to all entities, true for function, procedure and operator
3297-- entities.
3298
b9696ffb
AC
3299-- Is_Subprogram_Or_Generic_Subprogram
3300-- Applies to all entities, true for function procedure and operator
3301-- entities, and also for the corresponding generic entities.
3302
fa5aa835 3303-- Is_Synchronized_Interface (synthesized)
30ebb114 3304-- Defined in types that are interfaces. True if interface is declared
0a36105d
JM
3305-- synchronized, task, or protected, or is derived from a synchronized
3306-- interface.
f4d379b8 3307
75b87c16
AC
3308-- Is_Synchronized_State (synthesized)
3309-- Applies to all entities, true for abstract states that are subject to
3310-- option Synchronous.
3311
a7cadd18 3312-- Is_Tag
30ebb114 3313-- Defined in E_Component and E_Constant entities. For regular tagged
21d27997
RD
3314-- type this flag is set on the tag component (whose name is Name_uTag).
3315-- For CPP_Class tagged types, this flag marks the pointer to the main
3316-- vtable (i.e. the one to be extended by derivation).
70482933 3317
a7cadd18 3318-- Is_Tagged_Type
00c93ba2 3319-- Defined in all entities, set for an entity that is a tagged type
70482933 3320
9e9df9da 3321-- Is_Task_Interface (synthesized)
30ebb114 3322-- Defined in types that are interfaces. True if interface is declared as
21d27997 3323-- a task interface, or if it is derived from task interfaces.
f4d379b8 3324
70482933 3325-- Is_Task_Record_Type (synthesized)
fd40a157 3326-- Applies to all entities, true if Is_Concurrent_Record_Type is true and
70482933
RK
3327-- Corresponding_Concurrent_Type is a task type.
3328
3329-- Is_Task_Type (synthesized)
fdce4bb7
JM
3330-- Applies to all entities. True for task types and subtypes
3331
a7cadd18 3332-- Is_Thunk
89e037d0
EB
3333-- Defined in all entities. True for subprograms that are thunks, that is
3334-- small subprograms built by the expander for particular tagged types.
3335-- There are two different kinds of thunk: interface thunk and secondary
3336-- stack thunk. Interface thunks are built for tagged types that cover
3337-- interface types. As part of the runtime call to an interface, they
da1c23dd
AC
3338-- displace the pointer to the object (pointer named "this" in the C++
3339-- terminology) from a secondary dispatch table to the primary dispatch
3340-- table associated with a given tagged type; if the thunk is a function
3341-- that returns an object which covers an interface type then the thunk
3342-- displaces the pointer to the object from the primary dispatch table to
89e037d0
EB
3343-- the secondary dispatch table associated with the interface type.
3344
3345-- Secondary stack thunks are built for tagged types that do not need to
3346-- be returned on the secondary stack but have primitive functions which
3347-- can dispatch on result. In this case, dispatching calls made to these
3348-- primitive functions nevertheless need to return on the secondary stack
3349-- and a thunk is built to move the result from the primary stack onto
3350-- the secondary stack on return from the primitive function. The flag
3351-- Has_Controlling_Result is set on secondary stack thunks but not on
3352-- interface thunks.
3353
3354-- Thunks may be chained in a single way: an interface thunk may point to
3355-- a secondary stack thunk, which points to the final thunk target.
0f282086 3356
a7cadd18 3357-- Is_Trivial_Subprogram
30ebb114 3358-- Defined in all entities. Set in subprograms where either the body
0f282086
RD
3359-- consists of a single null statement, or the first or only statement
3360-- of the body raises an exception. This is used for suppressing certain
3361-- warnings, see Sem_Ch6.Analyze_Subprogram_Body discussion for details.
70482933 3362
a7cadd18 3363-- Is_True_Constant
30ebb114 3364-- Defined in all entities for constants and variables. Set in constants
9d77af56
RD
3365-- and variables which have an initial value specified but which are
3366-- never assigned, partially or in the whole. For variables, it means
3367-- that the variable was initialized but never modified, and hence can be
3368-- treated as a constant by the code generator. For a constant, it means
3369-- that the constant was not modified by generated code (e.g. to set a
3370-- discriminant in an init proc). Assignments by user or generated code
273adcdf 3371-- will reset this flag. See also Is_Safe_To_Reevaluate.
70482933
RK
3372
3373-- Is_Type (synthesized)
3374-- Applies to all entities, true for a type entity
3375
a7cadd18 3376-- Is_Unchecked_Union [implementation base type only]
30ebb114 3377-- Defined in all entities. Set only in record types to which the
70482933
RK
3378-- pragma Unchecked_Union has been validly applied.
3379
a7cadd18 3380-- Is_Underlying_Full_View
ce06d641
AC
3381-- Defined in all entities. Set for types which represent the true full
3382-- view of a private type completed by another private type. For further
3383-- details, see attribute Underlying_Full_View.
3384
a7cadd18 3385-- Is_Underlying_Record_View [base type only]
30ebb114 3386-- Defined in all entities. Set only in record types that represent the
9013065b
AC
3387-- underlying record view. This view is built for derivations of types
3388-- with unknown discriminants; it is a record with the same structure
5987e59c 3389-- as its corresponding record type, but whose parent is the full view
9013065b
AC
3390-- of the parent in the original type extension.
3391
a7cadd18 3392-- Is_Unimplemented
d3ef4bd6
AC
3393-- Defined in all entities. Set for any entity to which a valid pragma
3394-- or aspect Unimplemented applies.
3395
a7cadd18 3396-- Is_Unsigned_Type
30ebb114 3397-- Defined in all types, but can be set only for discrete and fixed-point
70482933
RK
3398-- type and subtype entities. This flag is only valid if the entity is
3399-- frozen. If set it indicates that the representation is known to be
3400-- unsigned (i.e. that no negative values appear in the range). This is
3401-- normally just a reflection of the lower bound of the subtype or base
31fde973 3402-- type, but there is one case in which the setting is not obvious,
70482933
RK
3403-- namely the case of an unsigned subtype of a signed type from which
3404-- a further subtype is obtained using variable bounds. This further
3405-- subtype is still unsigned, but this cannot be determined by looking
3406-- at its bounds or the bounds of the corresponding base type.
446ac3e5
ES
3407-- For a subtype indication whose range is statically a null range,
3408-- the flag is set if the lower bound is non-negative, but the flag
3409-- cannot be used to determine the comparison operator to emit in the
3410-- generated code: use the base type.
70482933 3411
a7cadd18 3412-- Is_Uplevel_Referenced_Entity
f8dae9bb
AC
3413-- Defined in all entities. Used when unnesting subprograms to indicate
3414-- that an entity is locally defined within a subprogram P, and there is
3415-- a reference to the entity within a subprogram nested within P (at any
89a4fa68
AC
3416-- depth). Set for uplevel referenced objects (variables, constants,
3417-- discriminants and loop parameters), and also for upreferenced dynamic
3418-- types, including the cases where the reference is implicit (e.g. the
3419-- type of an array used for computing the location of an element in an
3420-- array. This is used internally in Exp_Unst, see this package for
3421-- further details.
f8dae9bb 3422
a7cadd18 3423-- Is_Valued_Procedure
30ebb114 3424-- Defined in procedure entities. Set if an Import_Valued_Procedure
70482933
RK
3425-- or Export_Valued_Procedure pragma applies to the procedure entity.
3426
a7cadd18 3427-- Is_Visible_Formal
124092ee 3428-- Defined in all entities. Set for instances of the formals of a
b8a93198
AC
3429-- formal package. Indicates that the entity must be made visible in the
3430-- body of the instance, to reproduce the visibility of the generic.
3431-- This simplifies visibility settings in instance bodies.
6e443c90 3432
a7cadd18 3433-- Is_Visible_Lib_Unit
8398e82e
AC
3434-- Defined in all (root or child) library unit entities. Once compiled,
3435-- library units remain chained to the entities in the parent scope, and
3436-- a separate flag must be used to indicate whether the names are visible
3437-- by selected notation, or not.
3438
a7cadd18 3439-- Is_Volatile
30ebb114 3440-- Defined in all type entities, and also in constants, components and
70482933
RK
3441-- variables. Set if a pragma Volatile applies to the entity. Also set
3442-- if pragma Shared or pragma Atomic applies to entity. In the case of
3443-- private or incomplete types, this flag is set in both the private
fbf5a39b
AC
3444-- and full view. The flag is not set reliably on private subtypes,
3445-- and is always retrieved from the base type (but this is not a base-
3446-- type-only attribute because it applies to other entities). Note that
28bc3323 3447-- the backend should use Treat_As_Volatile, rather than Is_Volatile
fbf5a39b
AC
3448-- to indicate code generation requirements for volatile variables.
3449-- Similarly, any front end test which is concerned with suppressing
3450-- optimizations on volatile objects should test Treat_As_Volatile
3451-- rather than testing this flag.
a7cadd18
BD
3452-- This is a synthesized attribute in Einfo.Utils, based on
3453-- Is_Volatile_Type and Is_Volatile_Object. The latter two should be
3454-- used in preference to Is_Volatile when we know that we have a type
3455-- or an object.
70482933 3456
a7cadd18 3457-- Is_Volatile_Full_Access
088c7e1b 3458-- Defined in all type entities, and also in constants, components, and
81e68a19 3459-- variables. Set if an aspect/pragma Volatile_Full_Access or an Ada 2022
b120ca61
EB
3460-- aspect Full_Access_Only applies to the entity. In the case of private
3461-- and incomplete types, this flag is set in both the partial view and
3462-- the full view.
57abdadd 3463
70482933 3464-- Is_Wrapper_Package (synthesized)
30ebb114 3465-- Defined in package entities. Indicates that the package has been
70482933
RK
3466-- created as a wrapper for a subprogram instantiation.
3467
c37c13e1
JM
3468-- Is_Wrapper
3469-- Defined in subprogram entities. Indicates that it has been created as
3470-- a wrapper to handle inherited class-wide pre/post conditions that call
3471-- overridden primitives or as a wrapper of a controlling function.
3472
a7cadd18 3473-- Itype_Printed
30ebb114 3474-- Defined in all type and subtype entities. Set in Itypes if the Itype
fdce4bb7
JM
3475-- has been printed by Sprint. This is used to avoid printing an Itype
3476-- more than once.
653da906 3477
a7cadd18 3478-- Kill_Elaboration_Checks
30ebb114 3479-- Defined in all entities. Set by the expander to kill elaboration
fbf5a39b 3480-- checks which are known not to be needed. Equivalent in effect to
e14c931f 3481-- the use of pragma Suppress (Elaboration_Checks) for that entity
fbf5a39b
AC
3482-- except that the effect is permanent and cannot be undone by a
3483-- subsequent pragma Unsuppress.
3484
a7cadd18 3485-- Kill_Range_Checks
30ebb114 3486-- Defined in all entities. Equivalent in effect to the use of pragma
e14c931f 3487-- Suppress (Range_Checks) for that entity except that the result is
6e443c90
RD
3488-- permanent and cannot be undone by a subsequent pragma Unsuppress.
3489-- This is currently only used in one odd situation in Sem_Ch3 for
3490-- record types, and it would be good to get rid of it???
fbf5a39b 3491
a7cadd18 3492-- Known_To_Have_Preelab_Init
30ebb114 3493-- Defined in all type and subtype entities. If set, then the type is
fdce4bb7
JM
3494-- known to have preelaborable initialization. In the case of a partial
3495-- view of a private type, it is only possible for this to be set if a
3496-- pragma Preelaborable_Initialization is given for the type. For other
3497-- types, it is never set if the type does not have preelaborable
3498-- initialization, it may or may not be set if the type does have
3499-- preelaborable initialization.
3500
a7cadd18 3501-- Last_Aggregate_Assignment
4ac2bbbd
AC
3502-- Applies to controlled constants and variables initialized by an
3503-- aggregate. Points to the last statement associated with the expansion
3504-- of the aggregate. The attribute is used by the finalization machinery
3505-- when marking an object as successfully initialized.
e2ef0ff6 3506
a7cadd18 3507-- Last_Assignment
30ebb114 3508-- Defined in entities for variables, and OUT or IN OUT formals. Set for
67ce0d7e
RD
3509-- a local variable or formal to point to the left side of an assignment
3510-- statement assigning a value to the variable. Cleared if the value of
3511-- the entity is referenced. Used to warn about dubious assignment
3512-- statements whose value is not used.
6e443c90 3513
a7cadd18 3514-- Last_Entity
d2a1dcf7
BD
3515-- Defined for the same entity kinds as First_Entity. Last_Entity
3516-- is the last entry in the list. Empty if no entities are chained.
70482933 3517
ea7f928b
AC
3518-- Last_Formal (synthesized)
3519-- Applies to subprograms and subprogram types, and also in entries
3520-- and entry families. Returns last formal of the subprogram or entry.
3521-- The formals are the first entities declared in a subprogram or in
3522-- a subprogram type (the designated type of an Access_To_Subprogram
3523-- definition) or in an entry.
3524
a7cadd18 3525-- Limited_View
30ebb114 3526-- Defined in non-generic package entities that are not instances. Bona
0fb2ea01
AC
3527-- fide package with the limited-view list through the first_entity and
3528-- first_private attributes. The elements of this list are the shadow
3529-- entities created for the types and local packages that are declared
19992053
AC
3530-- in a package appearing in a limited_with clause (Ada 2005: AI-50217).
3531
a7cadd18 3532-- Linker_Section_Pragma
19992053
AC
3533-- Present in constant, variable, type and subprogram entities. Points
3534-- to a linker section pragma that applies to the entity, or is Empty if
3535-- no such pragma applies. Note that for constants and variables, this
3536-- field may be set as a result of a linker section pragma applied to the
3537-- type of the object.
fbf5a39b 3538
d2a1dcf7 3539-- Lit_Hash [root type only]
c11207d3
PT
3540-- Defined in enumeration types and subtypes. Non-empty only for the
3541-- case of an enumeration root type, where it contains the entity for
3542-- the generated hash function. See unit Exp_Imgv for full details of
3543-- the nature and use of this entity for implementing the Value
3544-- attribute for the enumeration type in question.
3545
a7cadd18 3546-- Lit_Indexes
30ebb114 3547-- Defined in enumeration types and subtypes. Non-empty only for the
70482933
RK
3548-- case of an enumeration root type, where it contains the entity for
3549-- the generated indexes entity. See unit Exp_Imgv for full details of
e14c931f 3550-- the nature and use of this entity for implementing the Image and
70482933 3551-- Value attributes for the enumeration type in question.
383e179e 3552
a7cadd18 3553-- Lit_Strings
30ebb114 3554-- Defined in enumeration types and subtypes. Non-empty only for the
70482933
RK
3555-- case of an enumeration root type, where it contains the entity for
3556-- the literals string entity. See unit Exp_Imgv for full details of
3557-- the nature and use of this entity for implementing the Image and
3558-- Value attributes for the enumeration type in question.
3559
a7cadd18 3560-- Low_Bound_Tested
124092ee
AC
3561-- Defined in all entities. Currently this can only be set for formal
3562-- parameter entries of a standard unconstrained one-dimensional array
3563-- or string type. Indicates that an explicit test of the low bound of
3564-- the formal appeared in the code, e.g. in a pragma Assert. If this
fad0600d
AC
3565-- flag is set, warnings about assuming the index low bound to be one
3566-- are suppressed.
6e443c90 3567
a7cadd18 3568-- Machine_Radix_10
30ebb114 3569-- Defined in decimal types and subtypes, set if the Machine_Radix is 10,
e917aec2
RD
3570-- as the result of the specification of a machine radix representation
3571-- clause. Note that it is possible for this flag to be set without
3572-- having Has_Machine_Radix_Clause True. This happens when a type is
3573-- derived from a type with a clause present.
70482933 3574
a7cadd18 3575-- Master_Id
203876fc
AC
3576-- Defined in access types and subtypes. Empty unless Has_Task is set for
3577-- the designated type, in which case it points to the entity for the
3578-- Master_Id for the access type master. Also set for access-to-limited-
3579-- class-wide types whose root may be extended with task components, and
3580-- for access-to-limited-interfaces because they can be used to reference
3581-- tasks implementing such interface.
70482933 3582
a7cadd18 3583-- Materialize_Entity
30ebb114 3584-- Defined in all entities. Set only for renamed obects which should be
e526d0c7
AC
3585-- materialized for debugging purposes. This means that a memory location
3586-- containing the renamed address should be allocated. This is needed so
3587-- that the debugger can find the entity.
70482933 3588
a7cadd18 3589-- May_Inherit_Delayed_Rep_Aspects
15e934bf
AC
3590-- Defined in all entities for types and subtypes. Set if the type is
3591-- derived from a type which has delayed rep aspects (marked by the flag
3592-- Has_Delayed_Rep_Aspects being set). In this case, at the freeze point
3593-- for the derived type we know that the parent type is frozen, and if
3594-- a given attribute has not been set for the derived type, we copy the
3595-- value from the parent type. See Freeze.Inherit_Delayed_Rep_Aspects.
3596
a7cadd18 3597-- Mechanism (returned as Mechanism_Type)
30ebb114 3598-- Defined in functions and non-generic formal parameters. Indicates
70482933 3599-- the mechanism to be used for the function return or for the formal
28e18b4f
AC
3600-- parameter. See full description in the spec of Sem_Mech. This field
3601-- is also set (to the default value of zero = Default_Mechanism) in a
3602-- subprogram body entity but not used in this context.
70482933 3603
a7cadd18 3604-- Minimum_Accessibility
43b26411
JS
3605-- Defined in formal parameters in the non-generic case. Normally Empty,
3606-- but if expansion is active, and a parameter exists for which a
3607-- dynamic accessibility check is required, then an object is generated
3608-- within such a subprogram representing the accessibility level of the
3609-- subprogram or the formal's Extra_Accessibility - whichever one is
3610-- lesser. The Minimum_Accessibility field then points to this object.
3611
a7cadd18 3612-- Modulus [base type only]
30ebb114 3613-- Defined in modular types. Contains the modulus. For the binary case,
e917aec2
RD
3614-- this will be a power of 2, but if Non_Binary_Modulus is set, then it
3615-- will not be a power of 2.
70482933 3616
a7cadd18 3617-- Must_Be_On_Byte_Boundary
30ebb114 3618-- Defined in entities for types and subtypes. Set if objects of the type
e917aec2
RD
3619-- must always be allocated on a byte boundary (more accurately a storage
3620-- unit boundary). The front end checks that component clauses respect
28bc3323 3621-- this rule, and the backend ensures that record packing does not
e917aec2
RD
3622-- violate this rule. Currently the flag is set only for packed arrays
3623-- longer than 64 bits where the component size is not a power of 2.
0da2c8ac 3624
a7cadd18 3625-- Must_Have_Preelab_Init
30ebb114 3626-- Defined in entities for types and subtypes. Set in the full type of a
6e443c90
RD
3627-- private type or subtype if a pragma Has_Preelaborable_Initialization
3628-- is present for the private type. Used to check that the full type has
3629-- preelaborable initialization at freeze time (this has to be deferred
3630-- to the freeze point because of the rule about overriding Initialize).
3631
a7cadd18 3632-- Needs_Activation_Record
54e33e5f 3633-- Defined on generated subprogram types. Indicates that a call through
c84205cd
ES
3634-- a named or anonymous access to subprogram requires an activation
3635-- record when compiling with unnesting for C or LLVM.
3636
a7cadd18 3637-- Needs_Debug_Info
30ebb114 3638-- Defined in all entities. Set if the entity requires normal debugging
0f282086
RD
3639-- information to be generated. This is true of all entities that have
3640-- Comes_From_Source set, and also transitively for entities associated
3641-- with such components (e.g. their types). It is true for all entities
3642-- in Debug_Generated_Code mode (-gnatD switch). This is the flag that
28bc3323 3643-- the backend should check to determine whether or not to generate
0f282086
RD
3644-- debugging information for an entity. Note that callers should always
3645-- use Sem_Util.Set_Debug_Info_Needed, rather than Set_Needs_Debug_Info,
3646-- so that the flag is set properly on subsidiary entities.
70482933 3647
a7cadd18 3648-- Needs_No_Actuals
30ebb114 3649-- Defined in callable entities (subprograms, entries, access to
be035558 3650-- subprograms) which can be called without actuals because all of
70482933
RK
3651-- their formals (if any) have default values. This flag simplifies the
3652-- resolution of the syntactic ambiguity involving a call to these
3653-- entities when the return type is an array type, and a call can be
3654-- interpreted as an indexing of the result of the call. It is also
3655-- used to resolve various cases of entry calls.
383e179e 3656
a7cadd18 3657-- Never_Set_In_Source
30ebb114 3658-- Defined in all entities, but can be set only for variables and
5d37ba92
ES
3659-- parameters. This flag is set if the object is never assigned a value
3660-- in user source code, either by assignment or by being used as an out
3661-- or in out parameter. Note that this flag is not reset from using an
3662-- initial value, so if you want to test for this case as well, test the
3663-- Has_Initial_Value flag also.
3664--
70482933
RK
3665-- This flag is only for the purposes of issuing warnings, it must not
3666-- be used by the code generator to indicate that the variable is in
3667-- fact a constant, since some assignments in generated code do not
fbf5a39b
AC
3668-- count (for example, the call to an init proc to assign some but
3669-- not all of the fields in a partially initialized record). The code
70482933
RK
3670-- generator should instead use the flag Is_True_Constant.
3671--
203876fc
AC
3672-- For the purposes of this warning, the default assignment of access
3673-- variables to null is not considered the assignment of a value (so
3674-- the warning can be given for code that relies on this initial null
3675-- value when no other value is ever set).
fbf5a39b 3676--
70482933
RK
3677-- In variables and out parameters, if this flag is set after full
3678-- processing of the corresponding declarative unit, it indicates that
3679-- the variable or parameter was never set, and a warning message can
3680-- be issued.
3681--
3682-- Note: this flag is initially set, and then cleared on encountering
3683-- any construct that might conceivably legitimately set the value.
3684-- Thus during the analysis of a declarative region and its associated
fbf5a39b
AC
3685-- statement sequence, the meaning of the flag is "not set yet", and
3686-- once this analysis is complete the flag means "never assigned".
70482933 3687
203876fc
AC
3688-- Note: for variables appearing in package declarations, this flag is
3689-- never set. That is because there is no way to tell if some client
3690-- modifies the variable (or, in the case of variables in the private
3691-- part, if some child unit modifies the variables).
70482933
RK
3692
3693-- Note: in the case of renamed objects, the flag must be set in the
3694-- ultimate renamed object. Clients noting a possible modification
3695-- should use the Note_Possible_Modification procedure in Sem_Util
fbf5a39b 3696-- rather than Set_Never_Set_In_Source precisely to deal properly with
70482933
RK
3697-- the renaming possibility.
3698
3699-- Next_Component (synthesized)
f937473f
RD
3700-- Applies to record components. Returns the next component by following
3701-- the chain of declared entities until one is found which corresponds to
3702-- a component (Ekind is E_Component). Any internal types generated from
3703-- the subtype indications of the record components are skipped. Returns
3704-- Empty if no more components.
3705
3706-- Next_Component_Or_Discriminant (synthesized)
3707-- Similar to Next_Component, but includes components and discriminants
3708-- so the input can have either E_Component or E_Discriminant, and the
3709-- same is true for the result. Returns Empty if no more components or
3710-- discriminants in the record.
70482933
RK
3711
3712-- Next_Discriminant (synthesized)
203876fc 3713-- Applies to discriminants returned by First/Next_Discriminant. Returns
81a0f4a3 3714-- the next language-defined (i.e. perhaps non-stored) discriminant by
203876fc
AC
3715-- following the chain of declared entities as long as the kind of the
3716-- entity corresponds to a discriminant. Note that the discriminants
3717-- might be the only components of the record. Returns Empty if there
3718-- are no more discriminants.
70482933 3719
a7cadd18 3720-- Next_Entity
30ebb114 3721-- Defined in all entities. The entities of a scope are chained, with
70482933
RK
3722-- the head of the list being in the First_Entity field of the scope
3723-- entity. All entities use the Next_Entity field as a forward pointer
3724-- for this list, with Empty indicating the end of the list. Since this
3725-- field is in the base part of the entity, the access routines for this
3726-- field are in Sinfo.
3727
3728-- Next_Formal (synthesized)
203876fc
AC
3729-- Applies to the entity for a formal parameter. Returns the next formal
3730-- parameter of the subprogram or subprogram type. Returns Empty if there
3731-- are no more formals.
70482933
RK
3732
3733-- Next_Formal_With_Extras (synthesized)
3734-- Applies to the entity for a formal parameter. Returns the next
3735-- formal parameter of the subprogram or subprogram type. Returns
3736-- Empty if there are no more formals. The list returned includes
3737-- all the extra formals (see description of Extra_Formal field)
3738
70482933
RK
3739-- Next_Index (synthesized)
3740-- Applies to array types and subtypes and to string types and
3741-- subtypes. Yields the next index. The first index is obtained by
3742-- using the First_Index attribute, and then subsequent indexes are
3743-- obtained by applying Next_Index to the previous index. Empty is
3744-- returned to indicate that there are no more indexes. Note that
3745-- unlike most attributes in this package, Next_Index applies to
3746-- nodes for the indexes, not to entities.
3747
a7cadd18 3748-- Next_Inlined_Subprogram
30ebb114 3749-- Defined in subprograms. Used to chain inlined subprograms used in
70482933 3750-- the current compilation, in the order in which they must be compiled
03a72cd3 3751-- by the backend to ensure that all inlinings are performed.
70482933
RK
3752
3753-- Next_Literal (synthesized)
3754-- Applies to enumeration literals, returns the next literal, or
3755-- Empty if applied to the last literal. This is actually a synonym
3756-- for Next, but its use is preferred in this context.
3757
a7cadd18 3758-- No_Dynamic_Predicate_On_Actual
7a5b62b0 3759-- Defined in discrete types. Set for generic formal types that are used
41a7b948 3760-- in loops and quantified expressions. The corresponding actual cannot
7a5b62b0 3761-- have dynamic predicates.
a6282852 3762
a7cadd18 3763-- No_Pool_Assigned [root type only]
30ebb114 3764-- Defined in access types. Set if a storage size clause applies to the
19fb051c
AC
3765-- variable with a static expression value of zero. This flag is used to
3766-- generate errors if any attempt is made to allocate or free an instance
3767-- of such an access type. This is set only in the root type, since
3768-- derived types must have the same pool.
70482933 3769
a7cadd18 3770-- No_Predicate_On_Actual
7a5b62b0
AC
3771-- Defined in discrete types. Set for generic formal types that are used
3772-- in the spec of a generic package, in constructs that forbid discrete
3773-- types with predicates.
a6282852 3774
a7cadd18 3775-- No_Reordering [implementation base type only]
8489c295
AC
3776-- Defined in record types. Set only for a base type to which a valid
3777-- pragma No_Component_Reordering applies.
3778
a7cadd18 3779-- No_Return
90e97517
EB
3780-- Defined in all entities. Set for subprograms and generic subprograms
3781-- to which a valid aspect or pragma No_Return applies.
70482933 3782
a7cadd18 3783-- No_Strict_Aliasing [base type only]
49d41397
RD
3784-- Defined in access types. Set to direct the backend to avoid any
3785-- optimizations based on an assumption about the aliasing status of
3786-- objects designated by the access type. For the case of the gcc
3787-- backend, the effect is as though all references to objects of
3788-- the type were compiled with -fno-strict-aliasing. This flag is
3789-- set if an unchecked conversion with the access type as a target
3790-- type occurs in the same source unit as the declaration of the
3791-- access type, or if an explicit pragma No_Strict_Aliasing applies.
3792
a7cadd18 3793-- No_Tagged_Streams_Pragma
4ef36ac7 3794-- Present in all subtype and type entities. Set for tagged types and
49d41397
RD
3795-- subtypes (i.e. entities with Is_Tagged_Type set True) if a valid
3796-- pragma/aspect applies to the type.
3797
a7cadd18 3798-- Non_Binary_Modulus [base type only]
49d41397
RD
3799-- Defined in all subtype and type entities. Set for modular integer
3800-- types if the modulus value is other than a power of 2.
3801
a7cadd18 3802-- Non_Limited_View
49d41397
RD
3803-- Defined in abstract states and incomplete types that act as shadow
3804-- entities created when analysing a limited with clause (Ada 2005:
3805-- AI-50217). Points to the defining entity of the original declaration.
3806
a7cadd18 3807-- Nonzero_Is_True [base type only]
49d41397
RD
3808-- Defined in enumeration types. Set if any non-zero value is to be
3809-- interpreted as true. Currently this is set for derived Boolean
3810-- types which have a convention of C, C++ or Fortran.
3811
a7cadd18 3812-- Normalized_First_Bit
30ebb114 3813-- Defined in components and discriminants. Indicates the normalized
70482933
RK
3814-- value of First_Bit for the component, i.e. the offset within the
3815-- lowest addressed storage unit containing part or all of the field.
91b1417d 3816-- Set to No_Uint if no first bit position is assigned yet.
70482933 3817
a7cadd18 3818-- Normalized_Position
30ebb114 3819-- Defined in components and discriminants. Indicates the normalized
70482933
RK
3820-- value of Position for the component, i.e. the offset in storage
3821-- units from the start of the record to the lowest addressed storage
3822-- unit containing part or all of the field.
3823
70482933
RK
3824-- Number_Dimensions (synthesized)
3825-- Applies to array types and subtypes. Returns the number of dimensions
3826-- of the array type or subtype as a value of type Pos.
3827
70482933
RK
3828-- Number_Entries (synthesized)
3829-- Applies to concurrent types. Returns the number of entries that are
3830-- declared within the task or protected definition for the type.
3831
3832-- Number_Formals (synthesized)
3833-- Applies to subprograms and subprogram types. Yields the number of
3834-- formals as a value of type Pos.
3835
42e4b796
EB
3836-- Object_Size_Clause (synthesized)
3837-- Applies to entities for types and subtypes. If an object size clause
3838-- is present in the rep item chain for an entity then the attribute
3839-- definition clause node is returned. Otherwise Object_Size_Clause
3840-- returns Empty if no item is present. Usually this is only meaningful
3841-- if the flag Has_Object_Size_Clause is set. This is because when the
3842-- representation item chain is copied for a derived type, it can inherit
3843-- an object size clause that is not applicable to the entity.
3844
a7cadd18 3845-- OK_To_Rename
30ebb114 3846-- Defined only in entities for variables. If this flag is set, it
d1f453b7
RD
3847-- means that if the entity is used as the initial value of an object
3848-- declaration, the object declaration can be safely converted into a
3849-- renaming to avoid an extra copy. This is set for variables which are
3850-- generated by the expander to hold the result of evaluating some
3851-- expression. Most notably, the local variables used to store the result
3852-- of concatenations are so marked (see Exp_Ch4.Expand_Concatenate). It
3853-- is only worth setting this flag for composites, since for primitive
3854-- types, it is cheaper to do the copy.
3855
a7cadd18 3856-- Optimize_Alignment_Space
30ebb114 3857-- Defined in type, subtype, variable, and constant entities. This
1f159b86 3858-- flag records that the type or object is to be laid out in a manner
21d27997
RD
3859-- consistent with Optimize_Alignment (Space) mode. The compiler and
3860-- binder ensure a consistent view of any given type or object. If pragma
3861-- Optimize_Alignment (Off) mode applies to the type/object, then neither
3862-- of the flags Optimize_Alignment_Space/Optimize_Alignment_Time is set.
3863
a7cadd18 3864-- Optimize_Alignment_Time
30ebb114 3865-- Defined in type, subtype, variable, and constant entities. This
1f159b86 3866-- flag records that the type or object is to be laid out in a manner
21d27997
RD
3867-- consistent with Optimize_Alignment (Time) mode. The compiler and
3868-- binder ensure a consistent view of any given type or object. If pragma
3869-- Optimize_Alignment (Off) mode applies to the type/object, then neither
3870-- of the flags Optimize_Alignment_Space/Optimize_Alignment_Time is set.
82c80734 3871
a7cadd18 3872-- Original_Access_Type
30ebb114 3873-- Defined in E_Access_Subprogram_Type entities. Set only if the access
ded462b0
AC
3874-- type was generated by the expander as part of processing an access-
3875-- to-protected-subprogram type. Points to the access-to-protected-
aa1e353a
AC
3876-- subprogram type.
3877
a7cadd18 3878-- Original_Array_Type
8ca597af
RD
3879-- Defined in modular types and array types and subtypes. Set only if
3880-- the Is_Packed_Array_Impl_Type flag is set, indicating that the type
07fc65c4
GB
3881-- is the implementation type for a packed array, and in this case it
3882-- points to the original array type for which this is the packed
3883-- array implementation type.
3884
a7cadd18 3885-- Original_Protected_Subprogram
42f11e4c
AC
3886-- Defined in functions and procedures. Set only on internally built
3887-- dispatching subprograms of protected types to reference their original
3888-- non-dispatching protected subprogram since their names differ.
3889
a7cadd18 3890-- Original_Record_Component
30ebb114 3891-- Defined in components, including discriminants. The usage depends
70482933
RK
3892-- on whether the record is a base type and whether it is tagged.
3893--
3894-- In base tagged types:
3895-- When the component is inherited in a record extension, it points
3896-- to the original component (the entity of the ancestor component
28bc3323
AC
3897-- which is not itself inherited) otherwise it points to itself. The
3898-- backend uses this attribute to implement the automatic dereference
3899-- in the extension and to apply the transformation:
70482933
RK
3900--
3901-- Rec_Ext.Comp -> Rec_Ext.Parent. ... .Parent.Comp
3902--
7c0c194b 3903-- In base untagged types:
81a0f4a3
YM
3904-- Always points to itself except for non-stored discriminants, where
3905-- it points to the stored discriminant it renames.
70482933
RK
3906--
3907-- In subtypes (tagged and untagged):
3908-- Points to the component in the base type.
3909
a7cadd18 3910-- Overlays_Constant
c31b57af 3911-- Defined in all entities. Set only for E_Constant or E_Variable for
8a0183fd 3912-- which there is an address clause that causes the entity to overlay
c31b57af 3913-- a constant object.
21d27997 3914
a7cadd18 3915-- Overridden_Operation
30ebb114 3916-- Defined in subprograms. For overriding operations, points to the
6320f5e1
AC
3917-- user-defined parent subprogram that is being overridden. Note: this
3918-- attribute uses the same field as Static_Initialization. The latter
3919-- is only defined for internal initialization procedures, for which
3920-- Overridden_Operation is irrelevant. Thus this attribute must not be
3921-- set for init_procs.
10b93b2e 3922
a7cadd18 3923-- Package_Instantiation
30ebb114 3924-- Defined in packages and generic packages. When defined, this field
60370fb1 3925-- references an N_Generic_Instantiation node associated with an
f4d379b8
HK
3926-- instantiated package. In the case where the referenced node has
3927-- been rewritten to an N_Package_Specification, the instantiation
3928-- node is available from the Original_Node field of the package spec
3929-- node. This is currently not guaranteed to be set in all cases, but
30522cdb 3930-- when set, the field is used in Get_Unit_Instantiation_Node as
f4d379b8
HK
3931-- one of the means of obtaining the instantiation node. Eventually
3932-- it should be set in all cases, including package entities associated
3933-- with formal packages. ???
3934
a7cadd18 3935-- Packed_Array_Impl_Type
b3f75672
EB
3936-- Defined in array types and subtypes, except for the string literal
3937-- subtype case, if the corresponding type is packed and implemented
607114db 3938-- specially (either bit-packed or packed to eliminate holes in the
b3f75672
EB
3939-- non-contiguous enumeration index types). References the type used to
3940-- represent the packed array, which is either a modular type for short
607114db 3941-- static arrays or an array of System.Unsigned in the bit-packed case,
02848684 3942-- or a regular array in the non-standard enumeration index case. Note
b3f75672
EB
3943-- that in some situations (internal types and references to fields of
3944-- variant records), it is not always possible to construct this type in
3945-- advance of its use. If this field is empty, then the necessary type
3946-- is declared on the fly for each reference to the array.
70482933
RK
3947
3948-- Parameter_Mode (synthesized)
3949-- Applies to formal parameter entities. This is a synonym for Ekind,
3950-- used when obtaining the formal kind of a formal parameter (the result
4ef36ac7 3951-- is one of E_[In/Out/In_Out]_Parameter).
70482933 3952
a7cadd18 3953-- Parent_Subtype [base type only]
30ebb114 3954-- Defined in E_Record_Type. Set only for derived tagged types, in which
6fb4cdde
AC
3955-- case it points to the subtype of the parent type. This is the type
3956-- that is used as the Etype of the _parent field.
70482933 3957
a7cadd18 3958-- Part_Of_Constituents
75b87c16
AC
3959-- Present in abstract state and variable entities. Contains all
3960-- constituents that are subject to indicator Part_Of (both aspect and
3961-- option variants).
d7af5ea5 3962
a7cadd18 3963-- Part_Of_References
fdc54be6
AC
3964-- Present in variable entities. Contains all references to the variable
3965-- when it is subject to pragma Part_Of. If the variable is a constituent
3966-- of a single protected/task type, the references are examined as they
587af009
PT
3967-- must appear only within the type definition and the corresponding
3968-- body.
fdc54be6 3969
f7937111
GD
3970-- Partial_DIC_Procedure (synthesized)
3971-- Defined in type entities. Set for a private type and its full view
3972-- when the type is subject to pragma Default_Initial_Condition (DIC), or
3973-- when the type inherits a DIC pragma from a parent type. Points to the
3974-- entity of a procedure that takes a single argument of the given type
3975-- and verifies the assertion expression of the DIC pragma at run time.
3976-- When present, the Partial_DIC_Procedure of a type only checks DICs
3977-- associated with the partial (private) view of the type, and is invoked
3978-- by the full DIC_Procedure (which may check additional DICs associated
3979-- with the full view).
3980
3981-- Note: the reason this is marked as a synthesized attribute is that the
3982-- way this is stored is as an element of the Subprograms_For_Type field.
3983
3ddfabe3
AC
3984-- Partial_Invariant_Procedure (synthesized)
3985-- Defined in types and subtypes. Set for private types when one or more
3986-- [class-wide] type invariants apply to them. Points to the entity for a
3987-- procedure which checks the invariant. This invariant procedure takes a
3988-- single argument of the given type, and returns if the invariant holds,
3989-- or raises exception Assertion_Error with an appropriate message if it
3990-- does not hold. This attribute is defined but always Empty for private
3991-- subtypes. This attribute is also set for the corresponding full type.
3992--
3993-- Note: the reason this is marked as a synthesized attribute is that the
3994-- way this is stored is as an element of the Subprograms_For_Type field.
3995
d89ce432 3996-- Partial_Refinement_Constituents (synthesized)
05f1a543
AC
3997-- Defined in abstract state entities. Returns the constituents that
3998-- refine the state in the current scope, which are allowed in a global
c9d2e84b 3999-- refinement in this scope. These consist of those constituents that are
05f1a543
AC
4000-- abstract states with no or only partial refinement visible, and those
4001-- that are not themselves abstract states.
d89ce432 4002
a7cadd18 4003-- Partial_View_Has_Unknown_Discr
dacc3457 4004-- Present in all types. Set to Indicate that the partial view of a type
07a64c02
AC
4005-- has unknown discriminants. A default initialization of an object of
4006-- the type does not require an invariant check (AI12-0133).
4007
a7cadd18 4008-- Pending_Access_Types
760804f3
AC
4009-- Defined in all types. Set for incomplete, private, Taft-amendment
4010-- types, and their corresponding full views. This list contains all
4011-- access types, both named and anonymous, declared between the partial
4012-- and the full view. The list is used by the finalization machinery to
4013-- ensure that the finalization masters of all pending access types are
4014-- fully initialized when the full view is frozen.
4015
a7cadd18 4016-- Postconditions_Proc
a968d80d 4017-- Obsolete field which can be removed once CodePeer is fixed ???
7ca78bba 4018
4818e7b9 4019-- Predicate_Function (synthesized)
30ebb114 4020-- Defined in all types. Set for types for which (Has_Predicates is True)
fd0ff1cf 4021-- and for which a predicate procedure has been built that tests that the
4818e7b9 4022-- specified predicates are True. Contains the entity for the function
55a11c7e
SB
4023-- which takes a single argument of the given type (and sometimes an
4024-- additional Boolean parameter), and returns True if the predicate
4025-- holds and False if it does not.
fd0ff1cf 4026--
1e60643a
AC
4027-- Note: flag Has_Predicate does not imply that Predicate_Function is set
4028-- to a non-empty entity; this happens, for example, for itypes created
4029-- when instantiating generic units with private types with predicates.
4030-- However, if an explicit pragma Predicate or Predicate aspect is given
4031-- either for private or full type declaration then both Has_Predicates
4032-- and a non-empty Predicate_Function will be set on both the partial and
4033-- full views of the type.
4034--
fd0ff1cf
RD
4035-- Note: the reason this is marked as a synthesized attribute is that the
4036-- way this is stored is as an element of the Subprograms_For_Type field.
4037
55a11c7e
SB
4038-- Predicate_Expression
4039-- Defined on functions. For the defining identifier of the subprogram
4040-- declaration (not of the subprogram body) of a predicate function,
4041-- yields the expression for the noninherited portion of the given
4042-- predicate (except in the case where the inherited portion is
4043-- non-empty and the non-inherited portion is empty, in which case the
4044-- expression for the inherited portion is returned). Otherwise yields
4045-- empty.
fc142f63 4046
a7cadd18 4047-- Predicated_Parent
ffdd5248
ES
4048-- Defined on itypes created by subtype indications, when the parent
4049-- subtype has predicates. The itype shares the Predicate_Function
4050-- of the predicated parent, but this function may not have been built
4051-- at the point the Itype is constructed, so this attribute allows its
4052-- retrieval at the point a predicate check needs to be generated.
4053-- The utility Predicate_Function takes this link into account.
4054
a7cadd18 4055-- Predicates_Ignored
8d4611f7
AC
4056-- Defined on all types. Indicates whether the subtype declaration is in
4057-- a context where Assertion_Policy is Ignore, in which case no checks
4058-- (static or dynamic) must be generated for objects of the type.
4059
a7cadd18 4060-- Prev_Entity
3f6d1daa 4061-- Defined in all entities. The entities of a scope are chained, and this
587af009 4062-- field is used as a backward pointer for this entity list - effectively
3f6d1daa
JS
4063-- making the entity chain doubly-linked.
4064
68f640f2 4065-- Primitive_Operations (synthesized)
30ebb114 4066-- Defined in concurrent types, tagged record types and subtypes, tagged
68f640f2
AC
4067-- private types and tagged incomplete types. For concurrent types whose
4068-- Corresponding_Record_Type (CRT) is available, returns the list of
4069-- Direct_Primitive_Operations of its CRT; otherwise returns No_Elist.
4070-- For all the other types returns the Direct_Primitive_Operations.
4071
a7cadd18 4072-- Prival
30ebb114 4073-- Defined in private components of protected types. Refers to the entity
21d27997
RD
4074-- of the component renaming declaration generated inside protected
4075-- subprograms, entries or barrier functions.
4076
a7cadd18 4077-- Prival_Link
30ebb114 4078-- Defined in constants and variables which rename private components of
21d27997
RD
4079-- protected types. Set to the original private component.
4080
a7cadd18 4081-- Private_Dependents
30ebb114 4082-- Defined in private (sub)types. Records the subtypes of the private
ae65d635
AC
4083-- type, derivations from it, and records and arrays with components
4084-- dependent on the type.
70482933 4085--
ae65d635
AC
4086-- The subtypes are traversed when installing and deinstalling (the full
4087-- view of) a private type in order to ensure correct view of the
4088-- subtypes.
70482933
RK
4089--
4090-- Used in similar fashion for incomplete types: holds list of subtypes
4091-- of these incomplete types that have discriminant constraints. The
4092-- full views of these subtypes are constructed when the full view of
4093-- the incomplete type is processed.
4094
4095-- In addition, if the incomplete type is the designated type in an
4096-- access definition for an access parameter, the operation may be
4097-- a dispatching primitive operation, which is only known when the full
4098-- declaration of the type is seen. Subprograms that have such an
4099-- access parameter are also placed in the list of private_dependents.
4100
a7cadd18 4101-- Protected_Body_Subprogram
02886c2e
AC
4102-- Defined in protected operations. References the entity for the
4103-- subprogram which implements the body of the operation.
4104
a7cadd18 4105-- Protected_Formal
30ebb114 4106-- Defined in formal parameters (in, in out and out parameters). Used
70482933
RK
4107-- only for formals of protected operations. References corresponding
4108-- formal parameter in the unprotected version of the operation that
4109-- is created during expansion.
4110
a7cadd18 4111-- Protected_Subprogram
90e491a7
PMR
4112-- Defined in functions and procedures. Set for the pair of subprograms
4113-- which emulate the runtime semantics of a protected subprogram. Denotes
4114-- the entity of the origial protected subprogram.
4115
a7cadd18 4116-- Protection_Object
21d27997
RD
4117-- Applies to protected entries, entry families and subprograms. Denotes
4118-- the entity which is used to rename the _object component of protected
4119-- types.
70482933 4120
a7cadd18 4121-- Reachable
30ebb114 4122-- Defined in labels. The flag is set over the range of statements in
70482933
RK
4123-- which a goto to that label is legal.
4124
a7cadd18 4125-- Receiving_Entry
90e491a7
PMR
4126-- Defined in procedures. Set for an internally generated procedure which
4127-- wraps the original statements of an accept alternative. Designates the
4128-- entity of the task entry being accepted.
4129
a7cadd18 4130-- Referenced
30ebb114 4131-- Defined in all entities. Set if the entity is referenced, except for
e14c931f 4132-- the case of an appearance of a simple variable that is not a renaming
ce0bead3 4133-- as the left side of an assignment in which case Referenced_As_LHS is
e14c931f 4134-- set instead, or a similar appearance as an out parameter actual, in
8d12c865 4135-- which case Referenced_As_Out_Parameter is set.
fbf5a39b 4136
46924ad7 4137-- Referenced_As_LHS
30ebb114 4138-- Defined in all entities. This flag is set instead of Referenced if a
fdce4bb7
JM
4139-- simple variable that is not a renaming appears as the left side of an
4140-- assignment. The reason we distinguish this kind of reference is that
4141-- we have a separate warning for variables that are only assigned and
4142-- never read.
70482933 4143
46924ad7 4144-- Referenced_As_Out_Parameter
30ebb114 4145-- Defined in all entities. This flag is set instead of Referenced if a
ce0bead3
HK
4146-- simple variable that is not a renaming appears as an actual for an out
4147-- formal. The reason we distinguish this kind of reference is that
4148-- we have a separate warning for variables that are only assigned and
4149-- never read, and out parameters are a special case.
4150
a7cadd18 4151-- Refinement_Constituents
ab8843fa
HK
4152-- Present in abstract state entities. Contains all the constituents that
4153-- refine the state, in other words, all the hidden states that appear in
4154-- the constituent_list of aspect/pragma Refined_State.
4155
a7cadd18 4156-- Register_Exception_Call
30ebb114 4157-- Defined in exception entities. When an exception is declared,
70482933
RK
4158-- a call is expanded to Register_Exception. This field points to
4159-- the expanded N_Procedure_Call_Statement node for this call. It
4160-- is used for Import/Export_Exception processing to modify the
4161-- register call to make appropriate entries in the special tables
e51102b2 4162-- used for handling these pragmas at run time.
70482933 4163
a7cadd18 4164-- Related_Array_Object
30ebb114 4165-- Defined in array types and subtypes. Used only for the base type
70482933
RK
4166-- and subtype created for an anonymous array object. Set to point
4167-- to the entity of the corresponding array object. Currently used
4168-- only for type-related error messages.
4169
a7cadd18 4170-- Related_Expression
80a09e02
AC
4171-- Defined in variables, types and functions. When Set for internally
4172-- generated entities, it may be used to denote the source expression
4173-- whose elaboration created the variable declaration. If set, it is used
c2e54001
AC
4174-- for generating clearer messages from CodePeer. It is used on source
4175-- entities that are variables in iterator specifications, to provide
4176-- a link to the container that is the domain of iteration. This allows
4177-- for better cross-reference information when the loop modifies elements
4178-- of the container, and suppresses spurious warnings.
80a09e02
AC
4179-- Finally this node is used on functions specified via the Real_Literal
4180-- aspect, to denote the 2-parameter overloading, if found.
cf49bd32
TQ
4181--
4182-- Shouldn't it also be used for the same purpose in errout? It seems
4183-- odd to have two mechanisms here???
a4941eec 4184
a7cadd18 4185-- Related_Instance
30ebb114 4186-- Defined in the wrapper packages created for subprogram instances.
70482933
RK
4187-- The internal subprogram that implements the instance is inside the
4188-- wrapper package, but for debugging purposes its external symbol
4189-- must correspond to the name and scope of the related instance.
4190
a7cadd18 4191-- Related_Type
30ebb114 4192-- Defined in components, constants and variables. Set when there is an
cefce34c
JM
4193-- associated dispatch table to point to entities containing primary or
4194-- secondary tags. Not set in the _tag component of record types.
0a36105d 4195
a7cadd18 4196-- Relative_Deadline_Variable [implementation base type only]
30ebb114 4197-- Defined in task type entities. This flag is set if a valid and
21d27997
RD
4198-- effective pragma Relative_Deadline applies to the base type. Points
4199-- to the entity for a variable that is created to hold the value given
4200-- in a Relative_Deadline pragma for a task type.
4201
a7cadd18 4202-- Renamed_Entity
90e491a7
PMR
4203-- Defined in exception, generic unit, package, and subprogram entities.
4204-- Set when the entity is defined by a renaming declaration. Denotes the
4205-- renamed entity, or transitively the ultimate renamed entity if there
4206-- is a chain of renaming declarations. Empty if no renaming.
70482933 4207
a7cadd18 4208-- Renamed_In_Spec
30ebb114 4209-- Defined in package entities. If a package renaming occurs within
ce0bead3
HK
4210-- a package spec, then this flag is set on the renamed package. The
4211-- purpose is to prevent a warning about unused entities in the renamed
4212-- package. Such a warning would be inappropriate since clients of the
4213-- package can see the entities in the package via the renaming.
4214
a7cadd18 4215-- Renamed_Object
a65dcb0d
AC
4216-- Defined in components, constants, discriminants, formal parameters,
4217-- generic formals, loop parameters, and variables. Set to non-Empty if
4218-- the object was declared by a renaming declaration. For constants and
4219-- variables, the attribute references the tree node for the name of the
4220-- renamed object. For formal parameters, the field is used in inlining
4221-- and maps the entities of all formal parameters of a subprogram to the
4222-- entities of the corresponding actuals. For formals of a task entry,
4223-- the attribute denotes the local renaming that replaces the actual
4224-- within an accept statement. For all remaining cases (discriminants,
4225-- loop parameters) the field is Empty.
70482933 4226
a7cadd18 4227-- Requires_Overriding
30ebb114 4228-- Defined in all subprograms and entries. Set for subprograms that
f937473f 4229-- require overriding as defined by RM-2005-3.9.3(6/2). Note that this
a9fdbccb 4230-- is True only for implicitly declared subprograms; it is not set on the
f937473f
RD
4231-- parent type's subprogram. See also Is_Abstract_Subprogram.
4232
a7cadd18 4233-- Return_Applies_To
30ebb114 4234-- Defined in E_Return_Statement. Points to the entity representing
6e443c90
RD
4235-- the construct to which the return statement applies, as defined in
4236-- RM-6.5(4/2). Note that a (simple) return statement within an
4237-- extended_return_statement applies to the extended_return_statement,
4238-- even though it causes the whole function to return.
c5a913d3
EB
4239-- Also defined in special E_Block entities built as E_Return_Statement
4240-- for extended return statements and attached to the block statement
4241-- by Expand_N_Extended_Return_Statement before being turned into an
4242-- E_Block by semantic analysis.
6e443c90 4243
a7cadd18 4244-- Return_Present
02886c2e
AC
4245-- Defined in function and generic function entities. Set if the
4246-- function contains a return statement (used for error checking).
4247-- This flag can also be set in procedure and generic procedure
4248-- entities (for convenience in setting it), but is only tested
4249-- for the function case.
4250
d315f859
RK
4251-- Return_Statement
4252-- Defined in E_Variable. Set when Is_Return_Object is set, in which
4253-- case it points to the N_Simple_Return_Statement made from the
4254-- extended return statement.
4255
a7cadd18 4256-- Returns_By_Ref
c392a001
GD
4257-- Defined in subprogram type entities and functions. Set if a function
4258-- (or an access-to-function type) returns a result by reference, either
89e037d0 4259-- because the result is built in place, or its type is by-reference.
70482933 4260
a7cadd18 4261-- Reverse_Bit_Order [base type only]
30ebb114 4262-- Defined in all record type entities. Set if entity has a Bit_Order
8f66cda7
AC
4263-- aspect (set by an aspect clause or attribute definition clause) that
4264-- has reversed the order of bits from the default value. When this flag
4265-- is set, a component clause must specify a set of bits entirely within
4266-- a single storage unit (Ada 95) or within a single machine scalar (see
4267-- Ada 2005 AI-133), or must occupy an integral number of storage units.
70482933 4268
a7cadd18 4269-- Reverse_Storage_Order [base type only]
30ebb114 4270-- Defined in all record and array type entities. Set if entity has a
de94a7e7
AC
4271-- Scalar_Storage_Order aspect (set by an aspect clause or attribute
4272-- definition clause) that has reversed the order of storage elements
a2c1791d
AC
4273-- from the default value. When this flag is set for a record type,
4274-- the Bit_Order aspect must be set to the same value (either explicitly
4275-- or as the target default value).
de94a7e7 4276
a7cadd18 4277-- Rewritten_For_C
2700b9c1 4278-- Defined on functions that return a constrained array type, when
ed11bbfe 4279-- Modify_Tree_For_C is set. Indicates that a procedure with an extra
2700b9c1
AC
4280-- out parameter has been created for it, and calls must be rewritten as
4281-- calls to the new procedure.
4282
a7cadd18 4283-- RM_Size
30ebb114 4284-- Defined in all type and subtype entities. Contains the value of
70482933
RK
4285-- type'Size as defined in the RM. See also the Esize field and
4286-- and the description on "Handling of Type'Size Values". A value
9596236a 4287-- of zero in this field for a non-discrete type means that
70482933
RK
4288-- the front end has not yet determined the size value. For the
4289-- case of a discrete type, this field is always set by the front
4290-- end and zero is a legitimate value for a type with one value.
4291
4292-- Root_Type (synthesized)
596b25f9 4293-- Applies to all type entities. For class-wide types, returns the root
70482933
RK
4294-- type of the class covered by the CW type, otherwise returns the
4295-- ultimate derivation ancestor of the given type. This function
4296-- preserves the view, i.e. the Root_Type of a partial view is the
e14c931f 4297-- partial view of the ultimate ancestor, the Root_Type of a full view
70482933
RK
4298-- is the full view of the ultimate ancestor. Note that this function
4299-- does not correspond exactly to the use of root type in the RM, since
4300-- in the RM root type applies to a class of types, not to a type.
4301
a7cadd18 4302-- Scalar_Range
30ebb114 4303-- Defined in all scalar types (including modular types, where the
70482933
RK
4304-- bounds are 0 .. modulus - 1). References a node in the tree that
4305-- contains the bounds for the range. Note that this information
4306-- could be obtained by rummaging around the tree, but it is more
4307-- convenient to have it immediately at hand in the entity. The
4308-- contents of Scalar_Range can either be an N_Subtype_Indication
c70f7583
ES
4309-- node (with a constraint), a Range node, or an Integer_Type_Definition,
4310-- but not a simple subtype reference (a subtype is converted into a
4311-- explicit range).
70482933 4312
a7cadd18 4313-- Scale_Value
2015a575
EB
4314-- Defined in decimal fixed-point types and subtypes. This holds the
4315-- value of the Scale attribute for the type, i.e. the scale of the type
4316-- defined as the integer N such that the delta is equal to 10.0**(-N).
4317-- Note that, if Scale_Value is positive, then it is equal to Aft_Value.
70482933 4318
a7cadd18 4319-- Scope
30ebb114 4320-- Defined in all entities. Points to the entity for the scope (block,
70482933
RK
4321-- loop, subprogram, package etc.) in which the entity is declared.
4322-- Since this field is in the base part of the entity node, the access
e0c23ac7
AC
4323-- routines for this field are in Sinfo. Note that for a child unit,
4324-- the Scope will be the parent package, and for a root library unit,
ba673907 4325-- the Scope will be Standard.
70482933 4326
9d77af56 4327-- Scope_Depth (synthesized)
7e3f6147
AC
4328-- Applies to program units, blocks, loops, return statements,
4329-- concurrent types, private types and entries, and also to record types,
4330-- i.e. to any entity that can appear on the scope stack. Yields the
4331-- scope depth value, which for those entities other than records is
4332-- simply the scope depth value, for record entities, it is the
4333-- Scope_Depth of the record scope.
70482933 4334
a7cadd18 4335-- Scope_Depth_Value
7e3f6147
AC
4336-- Defined in program units, blocks, loops, return statements,
4337-- concurrent types, private types and entries.
e2534738
AC
4338-- Indicates the number of scopes that statically enclose the declaration
4339-- of the unit or type. Library units have a depth of zero. Note that
4340-- record types can act as scopes but do NOT have this field set (see
36e38022
BD
4341-- Scope_Depth above). Queries should normally be via Scope_Depth,
4342-- and not call Scope_Depth_Value directly.
70482933
RK
4343
4344-- Scope_Depth_Set (synthesized)
4345-- Applies to a special predicate function that returns a Boolean value
e2534738 4346-- indicating whether or not the Scope_Depth field has been set. It is
a90bd866 4347-- needed, since returns an invalid value in this case.
70482933 4348
a7cadd18 4349-- Sec_Stack_Needed_For_Return
f32eb591
AC
4350-- Defined in scope entities (blocks, entries, entry families, functions,
4351-- and procedures). Set to True when secondary stack is used to hold the
4352-- returned value of a function and thus should not be released on scope
4353-- exit.
70482933 4354
a7cadd18 4355-- Shared_Var_Procs_Instance
30ebb114 4356-- Defined in variables. Set non-Empty only if Is_Shared_Passive is
685094bf
RD
4357-- set, in which case this is the entity for the associated instance of
4358-- System.Shared_Storage.Shared_Var_Procs. See Exp_Smem for full details.
70482933 4359
a7cadd18 4360-- Size_Check_Code
30ebb114 4361-- Defined in constants and variables. Normally Empty. Set if code is
fbf5a39b 4362-- generated to check the size of the object. This field is used to
70482933
RK
4363-- suppress this code if a subsequent address clause is encountered.
4364
4365-- Size_Clause (synthesized)
a547eea2
BD
4366-- Applies to all entities. If a size or value size clause is present in
4367-- the rep item chain for an entity then that attribute definition clause
4368-- is returned. Otherwise Size_Clause returns Empty. Usually this is only
4369-- meaningful if the flag Has_Size_Clause is set. This is because when
4370-- the representation item chain is copied for a derived type, it can
4371-- inherit a size clause that is not applicable to the entity.
70482933 4372
a7cadd18 4373-- Size_Depends_On_Discriminant
30ebb114 4374-- Defined in all entities for types and subtypes. Indicates that the
70482933 4375-- size of the type depends on the value of one or more discriminants.
e3c4580e
EB
4376-- Currently, this flag is only set for arrays which have one or more
4377-- bounds depending on a discriminant value.
70482933 4378
a7cadd18 4379-- Size_Known_At_Compile_Time
30ebb114 4380-- Defined in all entities for types and subtypes. Indicates that the
70482933
RK
4381-- size of objects of the type is known at compile time. This flag is
4382-- used to optimize some generated code sequences, and also to enable
4383-- some error checks (e.g. disallowing component clauses on variable
21d27997 4384-- length objects). It is set conservatively (i.e. if it is True, the
70482933
RK
4385-- size is certainly known at compile time, if it is False, then the
4386-- size may or may not be known at compile time, but the code will
167b47d9
AC
4387-- assume that it is not known). Note that the value may be known only
4388-- to the back end, so the fact that this flag is set does not mean that
4389-- the front end can access the value.
70482933 4390
a7cadd18 4391-- Small_Value
30ebb114 4392-- Defined in fixed point types. Points to the universal real for the
70482933
RK
4393-- Small of the type, either as given in a representation clause, or
4394-- as computed (as a power of two) by the compiler.
4395
a7cadd18 4396-- SPARK_Aux_Pragma
75b87c16
AC
4397-- Present in concurrent type, [generic] package spec and package body
4398-- entities. For concurrent types and package specs it refers to the
4399-- SPARK mode setting for the private part. This field points to the
4400-- N_Pragma node that either appears in the private part or is inherited
4401-- from the enclosing context. For package bodies, it refers to the SPARK
4402-- mode of the elaboration sequence after the BEGIN. The fields points to
4403-- the N_Pragma node that either appears in the statement sequence or is
877a5a12
AC
4404-- inherited from the enclosing context. In all cases, if the pragma is
4405-- inherited, then the SPARK_Aux_Pragma_Inherited flag is set.
579847c2 4406
a7cadd18 4407-- SPARK_Aux_Pragma_Inherited
75b87c16
AC
4408-- Present in concurrent type, [generic] package spec and package body
4409-- entities. Set if the SPARK_Aux_Pragma field points to a pragma that is
877a5a12
AC
4410-- inherited, rather than a local one.
4411
a7cadd18 4412-- SPARK_Pragma
8dce7371
PMR
4413-- Present in the following entities:
4414--
4415-- abstract states
4416-- constants
4417-- entries
4418-- operators
4419-- [generic] packages
4420-- package bodies
4421-- [generic] subprograms
4422-- subprogram bodies
4423-- variables
4424-- types
4425--
4426-- Points to the N_Pragma node that applies to the initial declaration or
4427-- body. This is either set by a local SPARK_Mode pragma or is inherited
4428-- from the context (from an outer scope for the spec case or from the
4429-- spec for the body case). In the case where the attribute is inherited,
4430-- flag SPARK_Pragma_Inherited is set. Empty if no SPARK_Mode pragma is
4431-- applicable.
579847c2 4432
a7cadd18 4433-- SPARK_Pragma_Inherited
8dce7371
PMR
4434-- Present in the following entities:
4435--
4436-- abstract states
4437-- constants
4438-- entries
4439-- operators
4440-- [generic] packages
4441-- package bodies
4442-- [generic] subprograms
4443-- subprogram bodies
4444-- variables
4445-- types
4446--
4447-- Set if the SPARK_Pragma attribute points to an inherited pragma rather
4448-- than a local one.
1c6269d3 4449
a7cadd18 4450-- Spec_Entity
30ebb114
AC
4451-- Defined in package body entities. Points to corresponding package
4452-- spec entity. Also defined in subprogram body parameters in the
70482933
RK
4453-- case where there is a separate spec, where this field references
4454-- the corresponding parameter entities in the spec.
4455
a7cadd18 4456-- SSO_Set_High_By_Default [base type only]
220d1fd9
AC
4457-- Defined for record and array types. Set in the base type if a pragma
4458-- Default_Scalar_Storage_Order (High_Order_First) was active at the time
4459-- the record or array was declared and therefore applies to it.
4460
a7cadd18 4461-- SSO_Set_Low_By_Default [base type only]
220d1fd9
AC
4462-- Defined for record and array types. Set in the base type if a pragma
4463-- Default_Scalar_Storage_Order (High_Order_First) was active at the time
4464-- the record or array was declared and therefore applies to it.
4465
475e1d24
JM
4466-- Static_Call_Helper
4467-- Defined on subprogram entities. Set if the subprogram has class-wide
4468-- preconditions. Denotes the helper that evaluates at runtime the
4469-- class-wide preconditions performing static calls.
4470
a7cadd18 4471-- Static_Discrete_Predicate
ee4eee0a 4472-- Defined in discrete types/subtypes with static predicates (with the
fc3a3f3b 4473-- two flags Has_Predicates and Has_Static_Predicate set). Set if the
ee4eee0a
AC
4474-- type/subtype has a static predicate. Points to a list of expression
4475-- and N_Range nodes that represent the predicate in canonical form. The
4476-- canonical form has entries sorted in ascending order, with duplicates
4477-- eliminated, and adjacent ranges coalesced, so that there is always a
4478-- gap in the values between successive entries. The entries in this list
4479-- are fully analyzed and typed with the base type of the subtype. Note
4480-- that all entries are static and have values within the subtype range.
26df19ce 4481
a7cadd18 4482-- Static_Elaboration_Desired
02886c2e
AC
4483-- Defined in library-level packages. Set by the pragma of the same
4484-- name, to indicate that static initialization must be attempted for
4485-- all types declared in the package, and that a warning must be emitted
4486-- for those types to which static initialization is not available.
4487
a7cadd18 4488-- Static_Initialization
02886c2e
AC
4489-- Defined in initialization procedures for types whose objects can be
4490-- initialized statically. The value of this attribute is a positional
4491-- aggregate whose components are compile-time static values. Used
4492-- when available in object declarations to eliminate the call to the
4493-- initialization procedure, and to minimize elaboration code. Note:
4494-- This attribute uses the same field as Overridden_Operation, which is
4495-- irrelevant in init_procs.
4496
a7cadd18 4497-- Static_Real_Or_String_Predicate
fc3a3f3b
RD
4498-- Defined in real types/subtypes with static predicates (with the two
4499-- flags Has_Predicates and Has_Static_Predicate set). Set if the type
4500-- or subtype has a static predicate. Points to the return expression
4501-- of the predicate function. This is the original expression given as
4502-- the predicate except that occurrences of the type are replaced by
4503-- occurrences of the formal parameter of the predicate function (note
9b7924dd
AC
4504-- that the spec of this function including this formal parameter name
4505-- is available from the Subprograms_For_Type field; it can be accessed
4506-- as Predicate_Function (typ)). Also, in the case where a predicate is
fc3a3f3b
RD
4507-- inherited, the expression is of the form:
4508--
9bdc432a 4509-- xxxPredicate (typ2 (ent)) AND THEN expression
fc3a3f3b
RD
4510--
4511-- where typ2 is the type from which the predicate is inherited, ent is
4512-- the entity for the current predicate function, and xxxPredicate is the
4513-- inherited predicate (from typ2). Finally for a predicate that inherits
4514-- from another predicate but does not add a predicate of its own, the
4515-- expression may consist of the above xxxPredicate call on its own.
4516
a7cadd18 4517-- Status_Flag_Or_Transient_Decl
6877306f
AC
4518-- Defined in constant, loop, and variable entities. Applies to objects
4519-- that require special treatment by the finalization machinery, such as
4520-- extended return results, IF and CASE expression results, and objects
4521-- inside N_Expression_With_Actions nodes. The attribute contains the
4522-- entity of a flag which specifies particular behavior over a region of
4523-- code or the declaration of a "hook" object.
d2a6bd6b 4524-- In which case is it a flag, or a hook object???
3cebd1c0 4525
a7cadd18 4526-- Storage_Size_Variable [implementation base type only]
50ea6357
AC
4527-- Defined in access types and task type entities. This flag is set
4528-- if a valid and effective pragma Storage_Size applies to the base
4529-- type. Points to the entity for a variable that is created to
4530-- hold the value given in a Storage_Size pragma for an access
4531-- collection or a task type. Note that in the access type case,
4532-- this field is defined only in the root type (since derived types
4533-- share the same storage pool).
4534
a7cadd18 4535-- Stored_Constraint
d2a1dcf7
BD
4536-- Defined in type entities. Points to an element list containing the
4537-- expressions for each of the stored discriminants, if any, for the
4538-- (sub)type.
fbf5a39b 4539
a7cadd18 4540-- Stores_Attribute_Old_Prefix
a1023434
JS
4541-- Defined in constants, variables, and types which are created during
4542-- expansion in order to save the value of attribute 'Old's prefix.
50ea6357 4543
a7cadd18 4544-- Strict_Alignment [implementation base type only]
a517d6c1
EB
4545-- Defined in all type entities. Indicates that the type is by-reference
4546-- or contains an aliased part. This forbids packing a component of this
4547-- type tighter than the alignment and size of the type, as specified by
4548-- RM 13.2(7) modified by AI12-001 as a Binding Interpretation.
70482933 4549
a7cadd18 4550-- String_Literal_Length
30ebb114 4551-- Defined in string literal subtypes (which are created to correspond
70482933
RK
4552-- to string literals in the program). Contains the length of the string
4553-- literal.
4554
a7cadd18 4555-- String_Literal_Low_Bound
30ebb114 4556-- Defined in string literal subtypes (which are created to correspond
70482933
RK
4557-- to string literals in the program). Contains an expression whose
4558-- value represents the low bound of the literal. This is a copy of
4559-- the low bound of the applicable index constraint if there is one,
4560-- or a copy of the low bound of the index base type if not.
4561
a7cadd18 4562-- Subprograms_For_Type
3ddfabe3
AC
4563-- Defined in all types. The list may contain the entities of the default
4564-- initial condition procedure, invariant procedure, and the two versions
4565-- of the predicate function.
4566--
4567-- Historical note: This attribute used to be a direct linked list of
4568-- entities rather than an Elist. The Elist allows greater flexibility
4569-- in inheritance of subprograms between views of the same type.
fd0ff1cf 4570
a7cadd18 4571-- Subps_Index
36e38022 4572-- Present in subprogram entities. Set if the subprogram contains nested
ee935273
AC
4573-- subprograms, or is a subprogram nested within such a subprogram. Holds
4574-- the index in the Exp_Unst.Subps table for the subprogram. Note that
4575-- for the outer level subprogram, this is the starting index in the Subp
4576-- table for the entries for this subprogram.
3830827c 4577
a7cadd18 4578-- Suppress_Elaboration_Warnings
967947ed
PMR
4579-- NOTE: this flag is relevant only for the legacy ABE mechanism and
4580-- should not be used outside of that context.
4581--
4582-- Defined in all entities, can be set only for subprogram entities and
4583-- for variables. If this flag is set then Sem_Elab will not generate
4584-- elaboration warnings for the subprogram or variable. Suppression of
4585-- such warnings is automatic for subprograms for which elaboration
4586-- checks are suppressed (without the need to set this flag), but the
4587-- flag is also set for various internal entities (such as init procs)
4588-- which are known not to generate any possible access before elaboration
4589-- and it is set on variables when a warning is given to avoid multiple
4590-- elaboration warnings for the same variable.
4591
a7cadd18 4592-- Suppress_Initialization
99425ec3
AC
4593-- Defined in all variable, type and subtype entities. If set for a base
4594-- type, then the generation of initialization procedures is suppressed
6cc85504 4595-- for the type. Any other implicit initialization (e.g. from the use of
99425ec3
AC
4596-- pragma Initialize_Scalars) is also suppressed if this flag is set for
4597-- either the subtype in question, or for the base type. For variables,
4598-- this flag suppresses all implicit initialization for the object, even
4599-- if the type would normally require initialization. Set by use of
4600-- pragma Suppress_Initialization and also for internal entities where
4601-- we know that no initialization is required. For example, enumeration
4602-- image table entities set it.
70482933 4603
a7cadd18 4604-- Suppress_Style_Checks
30ebb114 4605-- Defined in all entities. Suppresses any style checks specifically
70482933
RK
4606-- associated with the given entity if set.
4607
a7cadd18 4608-- Suppress_Value_Tracking_On_Call
30ebb114 4609-- Defined in all entities. Set in a scope entity if value tracking is to
0a36105d
JM
4610-- be suppressed on any call within the scope. Used when an access to a
4611-- local subprogram is computed, to deal with the possibility that this
4612-- value may be passed around, and if used, may clobber a local variable.
4613
a7cadd18 4614-- Task_Body_Procedure
30ebb114 4615-- Defined in task types and subtypes. Points to the entity for the task
cf49bd32
TQ
4616-- task body procedure (as further described in Exp_Ch9, task bodies are
4617-- expanded into procedures). A convenient function to retrieve this
4618-- field is Sem_Util.Get_Task_Body_Procedure.
4619--
4620-- The last sentence is odd??? Why not have Task_Body_Procedure go to the
4621-- Underlying_Type of the Root_Type???
a9d8907c 4622
a7cadd18 4623-- Thunk_Entity
59fad002
AC
4624-- Defined in functions and procedures which have been classified as
4625-- Is_Thunk. Set to the target entity called by the thunk.
4626
a7cadd18 4627-- Treat_As_Volatile
30ebb114 4628-- Defined in all type entities, and also in constants, components and
fbf5a39b
AC
4629-- variables. Set if this entity is to be treated as volatile for code
4630-- generation purposes. Always set if Is_Volatile is set, but can also
4631-- be set as a result of situations (such as address overlays) where
4632-- the front end wishes to force volatile handling to inhibit aliasing
4633-- optimization which might be legally ok, but is undesirable. Note
28bc3323 4634-- that the backend always tests this flag rather than Is_Volatile.
fbf5a39b
AC
4635-- The front end tests Is_Volatile if it is concerned with legality
4636-- checks associated with declared volatile variables, but if the test
4637-- is for the purposes of suppressing optimizations, then the front
4638-- end should test Treat_As_Volatile rather than Is_Volatile.
21d27997
RD
4639--
4640-- Note: before testing Treat_As_Volatile, consider whether it would
4641-- be more appropriate to use Exp_Util.Is_Volatile_Reference instead,
4642-- which catches more cases of volatile references.
fbf5a39b 4643
70482933 4644-- Type_High_Bound (synthesized)
6e443c90
RD
4645-- Applies to scalar types. Returns the tree node (Node_Id) that contains
4646-- the high bound of a scalar type. The returned value is literal for a
4647-- base type, but may be an expression in the case of scalar type with
84c54629 4648-- dynamic bounds.
70482933
RK
4649
4650-- Type_Low_Bound (synthesized)
6e443c90
RD
4651-- Applies to scalar types. Returns the tree node (Node_Id) that contains
4652-- the low bound of a scalar type. The returned value is literal for a
4653-- base type, but may be an expression in the case of scalar type with
84c54629 4654-- dynamic bounds.
70482933 4655
a7cadd18 4656-- Underlying_Full_View
30ebb114 4657-- Defined in private subtypes that are the completion of other private
6e443c90
RD
4658-- types, or in private types that are derived from private subtypes. If
4659-- the full view of a private type T is derived from another private type
4660-- with discriminants Td, the full view of T is also private, and there
4661-- is no way to attach to it a further full view that would convey the
5e9d6f05 4662-- structure of T to the backend. The Underlying_Full_View is an
6e443c90
RD
4663-- attribute of the full view that is a subtype of Td with the same
4664-- constraint as the declaration for T. The declaration for this subtype
4665-- is built at the point of the declaration of T, either as completion,
4666-- or as a subtype declaration where the base type is private and has a
4667-- private completion. If Td is already constrained, then its full view
4668-- can serve directly as the full view of T.
70482933 4669
a7cadd18 4670-- Underlying_Record_View
30ebb114 4671-- Defined in record types. Set for record types that are extensions of
9013065b
AC
4672-- types with unknown discriminants, and also set for internally built
4673-- underlying record views to reference its original record type. Record
4674-- types that are extensions of types with unknown discriminants do not
4675-- have a completion, but they cannot be used without having some
4676-- discriminated view at hand. This view is a record type with the same
4677-- structure, whose parent type is the full view of the parent in the
4678-- original type extension.
39f346aa 4679
70482933 4680-- Underlying_Type (synthesized)
6e443c90
RD
4681-- Applies to all entities. This is the identity function except in the
4682-- case where it is applied to an incomplete or private type, in which
4683-- case it is the underlying type of the type declared by the completion,
4684-- or Empty if the completion has not yet been encountered and analyzed.
70482933 4685--
6e443c90
RD
4686-- Note: the reason this attribute applies to all entities, and not just
4687-- types, is to legitimize code where Underlying_Type is applied to an
4688-- entity which may or may not be a type, with the intent that if it is a
4689-- type, its underlying type is taken.
aa611332
AC
4690--
4691-- Note also that the value of this attribute is interesting only after
4692-- the full view of the parent type has been processed. If the parent
4693-- type is declared in an enclosing package, the attribute will be non-
4694-- trivial only after the full view of the type has been analyzed.
70482933 4695
a7cadd18 4696-- Universal_Aliasing [implementation base type only]
30ebb114 4697-- Defined in all type entities. Set to direct the back-end to avoid
0a36105d
JM
4698-- any optimizations based on type-based alias analysis for this type.
4699-- Indicates that objects of this type can alias objects of any other
4700-- types, which guarantees that any objects can be referenced through
4701-- access types designating this type safely, whatever the actual type
4702-- of these objects. In other words, the effect is as though access
4703-- types designating this type were subject to No_Strict_Aliasing.
4704
a7cadd18 4705-- Unset_Reference
30ebb114 4706-- Defined in variables and out parameters. This is normally Empty. It
6e443c90
RD
4707-- is set to point to an identifier that represents a reference to the
4708-- entity before any value has been set. Only the first such reference
4709-- is identified. This field is used to generate a warning message if
4710-- necessary (see Sem_Warn.Check_Unset_Reference).
70482933 4711
a7cadd18 4712-- Used_As_Generic_Actual
30ebb114 4713-- Defined in all entities, set if the entity is used as an argument to
5b85ad7d
PMR
4714-- a generic instantiation. Used to tune certain warning messages, and
4715-- in checking type conformance within an instantiation that involves
4716-- incomplete formal and actual types.
5d37ba92 4717
a7cadd18 4718-- Uses_Lock_Free
30ebb114 4719-- Defined in protected type entities. Set to True when the Lock Free
8489c295 4720-- implementation is used for the protected type. This implementation is
88e7531b
AC
4721-- based on atomic transactions and doesn't require anymore the use of
4722-- Protection object (see System.Tasking.Protected_Objects).
4723
a7cadd18 4724-- Uses_Sec_Stack
f32eb591
AC
4725-- Defined in scope entities (blocks, entries, entry families, functions,
4726-- loops, and procedures). Set to True when the secondary stack is used
4727-- in this scope and must be released on exit unless flag
4728-- Sec_Stack_Needed_For_Return is set.
70482933 4729
a7cadd18 4730-- Validated_Object
89b6c83e
AC
4731-- Defined in variables. Contains the object whose value is captured by
4732-- the variable for validity check purposes.
4733
a7cadd18 4734-- Warnings_Off
30ebb114 4735-- Defined in all entities. Set if a pragma Warnings (Off, entity-name)
70482933 4736-- is used to suppress warnings for a given entity. It is also used by
0f282086
RD
4737-- the compiler in some situations to kill spurious warnings. Note that
4738-- clients should generally not test this flag directly, but instead
4739-- use function Has_Warnings_Off.
4740
a7cadd18 4741-- Warnings_Off_Used
30ebb114 4742-- Defined in all entities. Can only be set if Warnings_Off is set. If
0f282086
RD
4743-- set indicates that a warning was suppressed by the Warnings_Off flag,
4744-- and Unmodified/Unreferenced would not have suppressed the warning.
4745
a7cadd18 4746-- Warnings_Off_Used_Unmodified
30ebb114 4747-- Defined in all entities. Can only be set if Warnings_Off is set and
0f282086
RD
4748-- Has_Pragma_Unmodified is not set. If set indicates that a warning was
4749-- suppressed by the Warnings_Off status but that pragma Unmodified
4750-- would also have suppressed the warning.
4751
a7cadd18 4752-- Warnings_Off_Used_Unreferenced
30ebb114 4753-- Defined in all entities. Can only be set if Warnings_Off is set and
0f282086
RD
4754-- Has_Pragma_Unreferenced is not set. If set indicates that a warning
4755-- was suppressed by the Warnings_Off status but that pragma Unreferenced
4756-- would also have suppressed the warning.
70482933 4757
a7cadd18 4758-- Was_Hidden
30ebb114 4759-- Defined in all entities. Used to save the value of the Is_Hidden
10b93b2e
HK
4760-- attribute when the limited-view is installed (Ada 2005: AI-217).
4761
a7cadd18 4762-- Wrapped_Entity
30ebb114 4763-- Defined in functions and procedures which have been classified as
df3e68b1
HK
4764-- Is_Primitive_Wrapper. Set to the entity being wrapper.
4765
a968d80d
JS
4766-- Wrapped_Statements
4767-- Defined in functions, procedures, entries, and entry families. Refers
4768-- to the entity of the _Wrapped_Statements procedure which gets
4769-- generated as part of the expansion of contracts and postconditions
4770-- and contains its enclosing subprogram's original source declarations
4771-- and statements.
4772
c37c13e1
JM
4773-- LSP_Subprogram
4774-- Defined in subprogram entities. Set on wrappers created to handle
4775-- inherited class-wide pre/post conditions that call overridden
4776-- primitives. It references the parent primitive that has the
4777-- class-wide pre/post conditions.
4778
149604e4 4779---------------------------
2735b82d 4780-- Renaming and Aliasing --
149604e4
RD
4781---------------------------
4782
2735b82d
AC
4783-- Several entity attributes relate to renaming constructs, and to the use of
4784-- different names to refer to the same entity. The following is a summary of
19e7eae5 4785-- these constructs and their preferred uses.
149604e4
RD
4786
4787-- There are three related attributes:
2735b82d
AC
4788
4789-- Renamed_Entity
4790-- Renamed_Object
4791-- Alias
4792
a7cadd18
BD
4793-- These are implemented in Einfo.Utils as renamings of the Renamed_Or_Alias
4794-- field. They are semantically related, and have the following intended uses:
2735b82d 4795
c27a8bce 4796-- a) Renamed_Entity applies to entities in renaming declarations that rename
149604e4 4797-- an entity, so the value of the attribute IS an entity. This applies to
19e7eae5 4798-- generic renamings, package renamings, exception renamings, and subprogram
149604e4
RD
4799-- renamings that rename a subprogram (rather than an attribute, an entry, a
4800-- protected operation, etc).
2735b82d 4801
149604e4 4802-- b) Alias applies to overloadable entities, and the value is an overloadable
31ae1b46 4803-- entity. So this is a subset of the previous one. We use the term Alias to
149604e4 4804-- cover both renamings and inherited operations, because both cases are
31ae1b46 4805-- handled in the same way when expanding a call. Namely the Alias of a given
149604e4
RD
4806-- subprogram is the subprogram that will actually be called.
4807
4808-- Both a) and b) are set transitively, so that in fact it is not necessary to
4809-- traverse chains of renamings when looking for the original entity: it's
4810-- there in one step (this is done when analyzing renaming declarations other
4811-- than object renamings in sem_ch8).
4812
4813-- c) Renamed_Object applies to constants and variables. Given that the name
4814-- in an object renaming declaration is not necessarily an entity name, the
4815-- value of the attribute is the tree for that name, eg AR (1).Comp. The case
4816-- when that name is in fact an entity is not handled specially. This is why
4817-- in a few cases we need to use a loop to trace a chain of object renamings
4818-- where all of them happen to be entities. So:
4819
19e7eae5
BD
4820-- X : Integer;
4821-- Y : Integer renames X; -- renamed object is the identifier X
4822-- Z : Integer renames Y; -- renamed object is the identifier Y
149604e4
RD
4823
4824-- The front-end does not store explicitly the fact that Z renames X.
4825
2735b82d
AC
4826------------------
4827-- Access Kinds --
4828------------------
4829
4830-- The following entity kinds are introduced by the corresponding type
4831-- definitions:
4832
4833-- E_Access_Type,
4834-- E_General_Access_Type,
eb05097d
EB
4835-- E_Anonymous_Access_Type
4836
2735b82d
AC
4837-- E_Access_Subprogram_Type,
4838-- E_Anonymous_Access_Subprogram_Type,
eb05097d 4839
2735b82d
AC
4840-- E_Access_Protected_Subprogram_Type,
4841-- E_Anonymous_Access_Protected_Subprogram_Type
2735b82d 4842
eb05097d 4843-- E_Access_Subtype is for an access subtype created by a subtype declaration
2735b82d
AC
4844
4845-- In addition, we define the kind E_Allocator_Type to label allocators.
4846-- This is because special resolution rules apply to this construct.
4847-- Eventually the constructs are labeled with the access type imposed by
28bc3323 4848-- the context. The backend should never see types with this Ekind.
2735b82d 4849
eb05097d
EB
4850-- Similarly, we define the kind E_Access_Attribute_Type as the initial
4851-- kind associated with an access attribute whose prefix is an object.
4852-- After resolution, a specific access type will be established instead
4853-- as determined by the context. Note that, for the case of an access
4854-- attribute whose prefix is a subprogram, we build a corresponding type
4855-- with E_Access_Subprogram_Type or E_Access_Protected_Subprogram_Type kind
4856-- but whose designated type is the subprogram itself, instead of a regular
4857-- E_Subprogram_Type entity.
2735b82d 4858
70482933
RK
4859 --------------------------------------------------------
4860 -- Description of Defined Attributes for Entity_Kinds --
4861 --------------------------------------------------------
4862
4863 -- For each enumeration value defined in Entity_Kind we list all the
4864 -- attributes defined in Einfo which can legally be applied to an entity
4865 -- of that kind. The implementation of the attribute functions (and for
e14c931f 4866 -- non-synthesized attributes, of the corresponding set procedures) are
70482933
RK
4867 -- in the Einfo body.
4868
4b342b91 4869 -- The following attributes are defined in all entities
70482933 4870
f937473f
RD
4871 -- Ekind (Ekind)
4872
a7cadd18
BD
4873 -- Chars
4874 -- Next_Entity
4875 -- Scope
4876 -- Homonym
4877 -- Etype
4878 -- First_Rep_Item
4879 -- Freeze_Node
4880 -- Prev_Entity
4881 -- Associated_Entity
4882
4883 -- Address_Taken
4884 -- Can_Never_Be_Null
4885 -- Checks_May_Be_Suppressed
4886 -- Debug_Info_Off
4887 -- Has_Convention_Pragma
4888 -- Has_Delayed_Aspects
4889 -- Has_Delayed_Freeze
4890 -- Has_Fully_Qualified_Name
4891 -- Has_Gigi_Rep_Item
4892 -- Has_Homonym
4893 -- Has_Pragma_Elaborate_Body
4894 -- Has_Pragma_Inline
4895 -- Has_Pragma_Inline_Always
4896 -- Has_Pragma_No_Inline
4897 -- Has_Pragma_Pure
4898 -- Has_Pragma_Pure_Function
4899 -- Has_Pragma_Thread_Local_Storage
4900 -- Has_Pragma_Unmodified
4901 -- Has_Pragma_Unreferenced
4902 -- Has_Pragma_Unused
4903 -- Has_Private_Declaration
4904 -- Has_Qualified_Name
4905 -- Has_Stream_Size_Clause
4906 -- Has_Unknown_Discriminants
4907 -- Has_Xref_Entry
4908 -- In_Private_Part
4909 -- Is_Ada_2005_Only
4910 -- Is_Ada_2012_Only
07537fe6 4911 -- Is_Ada_2022_Only
a7cadd18
BD
4912 -- Is_Bit_Packed_Array (base type only)
4913 -- Is_Aliased
4914 -- Is_Character_Type
4915 -- Is_Checked_Ghost_Entity
4916 -- Is_Child_Unit
4917 -- Is_Compilation_Unit
4918 -- Is_Descendant_Of_Address
4919 -- Is_Discrim_SO_Function
4920 -- Is_Discriminant_Check_Function
4921 -- Is_Dispatch_Table_Entity
475e1d24 4922 -- Is_Dispatch_Table_Wrapper
a7cadd18
BD
4923 -- Is_Dispatching_Operation
4924 -- Is_Entry_Formal
4925 -- Is_Exported
4926 -- Is_First_Subtype
4927 -- Is_Formal_Subprogram
4928 -- Is_Generic_Instance
4929 -- Is_Generic_Type
4930 -- Is_Hidden
4931 -- Is_Hidden_Open_Scope
4932 -- Is_Ignored_Ghost_Entity
4933 -- Is_Immediately_Visible
4934 -- Is_Implementation_Defined
4935 -- Is_Imported
4936 -- Is_Inlined
4937 -- Is_Internal
4938 -- Is_Itype
4939 -- Is_Known_Non_Null
4940 -- Is_Known_Null
4941 -- Is_Known_Valid
4942 -- Is_Limited_Composite
4943 -- Is_Limited_Record
4944 -- Is_Loop_Parameter
4945 -- Is_Obsolescent
4946 -- Is_Package_Body_Entity
4947 -- Is_Packed_Array_Impl_Type
4948 -- Is_Potentially_Use_Visible
4949 -- Is_Preelaborated
4950 -- Is_Primitive_Wrapper
4951 -- Is_Public
4952 -- Is_Pure
4953 -- Is_Remote_Call_Interface
4954 -- Is_Remote_Types
4955 -- Is_Renaming_Of_Object
4956 -- Is_Shared_Passive
4957 -- Is_Statically_Allocated
4958 -- Is_Static_Type
4959 -- Is_Tagged_Type
4960 -- Is_Thunk
4961 -- Is_Trivial_Subprogram
4962 -- Is_Unchecked_Union
4963 -- Is_Unimplemented
4964 -- Is_Visible_Formal
4965 -- Kill_Elaboration_Checks
4966 -- Kill_Range_Checks
4967 -- Low_Bound_Tested
4968 -- Materialize_Entity
4969 -- Needs_Debug_Info
4970 -- Never_Set_In_Source
4971 -- No_Return
4972 -- Overlays_Constant
4973 -- Referenced
4974 -- Referenced_As_LHS
4975 -- Referenced_As_Out_Parameter
4976 -- Suppress_Elaboration_Warnings
4977 -- Suppress_Style_Checks
4978 -- Suppress_Value_Tracking_On_Call
4979 -- Used_As_Generic_Actual
4980 -- Warnings_Off
4981 -- Warnings_Off_Used
4982 -- Warnings_Off_Used_Unmodified
4983 -- Warnings_Off_Used_Unreferenced
4984 -- Was_Hidden
f937473f
RD
4985
4986 -- Declaration_Node (synth)
f937473f 4987 -- Has_Foreign_Convention (synth)
f937473f 4988 -- Is_Dynamic_Scope (synth)
95fef24f 4989 -- Is_Ghost_Entity (synth)
21d27997 4990 -- Is_Standard_Character_Type (synth)
bc3c2eca 4991 -- Is_Standard_String_Type (synth)
f937473f
RD
4992 -- Underlying_Type (synth)
4993 -- all classification attributes (synth)
70482933
RK
4994
4995 -- The following list of access functions applies to all entities for
4996 -- types and subtypes. References to this list appear subsequently as
86ec3bfb 4997 -- "(plus type attributes)" for each appropriate Entity_Kind.
70482933 4998
a7cadd18
BD
4999 -- Associated_Node_For_Itype
5000 -- Class_Wide_Type
5001 -- Full_View
5002 -- Esize
5003 -- RM_Size
5004 -- Alignment
5005 -- Pending_Access_Types
5006 -- Related_Expression
5007 -- Current_Use_Clause
5008 -- Subprograms_For_Type
5009 -- Derived_Type_Link
5010 -- No_Tagged_Streams_Pragma
5011 -- Linker_Section_Pragma
5012 -- SPARK_Pragma
5013
5014 -- Depends_On_Private
5015 -- Disable_Controlled
5016 -- Discard_Names
5017 -- Finalize_Storage_Only (base type only)
5018 -- From_Limited_With
5019 -- Has_Aliased_Components (base type only)
5020 -- Has_Alignment_Clause
5021 -- Has_Atomic_Components (base type only)
5022 -- Has_Completion_In_Body
5023 -- Has_Complex_Representation (base type only)
5024 -- Has_Constrained_Partial_View
5025 -- Has_Controlled_Component (base type only)
5026 -- Has_Default_Aspect (base type only)
5027 -- Has_Delayed_Rep_Aspects
5028 -- Has_Discriminants
5029 -- Has_Dynamic_Predicate_Aspect
5030 -- Has_Independent_Components (base type only)
5031 -- Has_Inheritable_Invariants (base type only)
5032 -- Has_Inherited_DIC (base type only)
5033 -- Has_Inherited_Invariants (base type only)
5034 -- Has_Non_Standard_Rep (base type only)
5035 -- Has_Object_Size_Clause
5036 -- Has_Own_DIC (base type only)
5037 -- Has_Own_Invariants (base type only)
5038 -- Has_Pragma_Preelab_Init
5039 -- Has_Pragma_Unreferenced_Objects
5040 -- Has_Predicates
5041 -- Has_Primitive_Operations (base type only)
5042 -- Has_Protected (base type only)
5043 -- Has_Size_Clause
5044 -- Has_Specified_Layout (base type only)
5045 -- Has_Specified_Stream_Input
5046 -- Has_Specified_Stream_Output
5047 -- Has_Specified_Stream_Read
5048 -- Has_Specified_Stream_Write
5049 -- Has_Static_Predicate
5050 -- Has_Static_Predicate_Aspect
5051 -- Has_Task (base type only)
5052 -- Has_Timing_Event (base type only)
5053 -- Has_Unchecked_Union (base type only)
5054 -- Has_Volatile_Components (base type only)
5055 -- In_Use
5056 -- Is_Abstract_Type
5057 -- Is_Asynchronous
5058 -- Is_Atomic
5059 -- Is_Constr_Subt_For_U_Nominal
5060 -- Is_Constr_Subt_For_UN_Aliased
5061 -- Is_Controlled_Active (base type only)
5062 -- Is_Eliminated
5063 -- Is_Frozen
5064 -- Is_Generic_Actual_Type
5065 -- Is_Independent
5066 -- Is_Non_Static_Subtype
5067 -- Is_Packed (base type only)
5068 -- Is_Private_Composite
5069 -- Is_RACW_Stub_Type
5070 -- Is_Unsigned_Type
5071 -- Is_Volatile
5072 -- Is_Volatile_Full_Access
5073 -- Itype_Printed (itypes only)
5074 -- Known_To_Have_Preelab_Init
5075 -- May_Inherit_Delayed_Rep_Aspects
5076 -- Must_Be_On_Byte_Boundary
5077 -- Must_Have_Preelab_Init
5078 -- Optimize_Alignment_Space
5079 -- Optimize_Alignment_Time
5080 -- Partial_View_Has_Unknown_Discr
5081 -- Size_Depends_On_Discriminant
5082 -- Size_Known_At_Compile_Time
5083 -- SPARK_Pragma_Inherited
5084 -- Strict_Alignment (base type only)
5085 -- Suppress_Initialization
5086 -- Treat_As_Volatile
5087 -- Universal_Aliasing (impl base type only)
f937473f
RD
5088
5089 -- Alignment_Clause (synth)
f937473f 5090 -- Base_Type (synth)
f63d601b
HK
5091 -- DIC_Procedure (synth)
5092 -- Has_DIC (synth)
3ddfabe3 5093 -- Has_Invariants (synth)
f937473f 5094 -- Implementation_Base_Type (synth)
fd0ff1cf 5095 -- Invariant_Procedure (synth)
f937473f 5096 -- Is_Access_Protected_Subprogram_Type (synth)
b120ca61 5097 -- Is_Full_Access (synth)
0cb81445 5098 -- Is_Controlled (synth)
42e4b796 5099 -- Object_Size_Clause (synth)
f7937111 5100 -- Partial_DIC_Procedure (synth)
3ddfabe3 5101 -- Partial_Invariant_Procedure (synth)
4818e7b9 5102 -- Predicate_Function (synth)
f937473f
RD
5103 -- Root_Type (synth)
5104 -- Size_Clause (synth)
70482933
RK
5105
5106 ------------------------------------------
5107 -- Applicable attributes by entity kind --
5108 ------------------------------------------
5109
898edf75
BD
5110 -- In the conversion to variable-sized nodes and entities, a number of
5111 -- discrepancies were noticed. They are documented in comments, and marked
5112 -- with "$$$".
76f9c7f4 5113
cf6956bb 5114 -- E_Abstract_State
a7cadd18
BD
5115 -- Refinement_Constituents
5116 -- Part_Of_Constituents
5117 -- Body_References
5118 -- Non_Limited_View
5119 -- Encapsulating_State
5120 -- SPARK_Pragma
5121 -- From_Limited_With
5122 -- Has_Partial_Visible_Refinement
5123 -- Has_Visible_Refinement
5124 -- SPARK_Pragma_Inherited
5125 -- First_Entity $$$
47346923 5126 -- Has_Non_Limited_View (synth)
2f54ef3d
AC
5127 -- Has_Non_Null_Visible_Refinement (synth)
5128 -- Has_Null_Visible_Refinement (synth)
aa500b7a 5129 -- Is_External_State (synth)
cf6956bb 5130 -- Is_Null_State (synth)
e577151d 5131 -- Is_Relaxed_Initialization_State (synth)
75b87c16 5132 -- Is_Synchronized_State (synth)
d89ce432 5133 -- Partial_Refinement_Constituents (synth)
cf6956bb 5134
70482933 5135 -- E_Access_Protected_Subprogram_Type
a7cadd18
BD
5136 -- Equivalent_Type
5137 -- Directly_Designated_Type
5138 -- Needs_No_Actuals
5139 -- Can_Use_Internal_Rep
21d27997 5140 -- (plus type attributes)
70482933
RK
5141
5142 -- E_Access_Subprogram_Type
a7cadd18
BD
5143 -- Equivalent_Type (remote types only)
5144 -- Directly_Designated_Type
5145 -- Needs_No_Actuals
5146 -- Original_Access_Type
5147 -- Can_Use_Internal_Rep
5148 -- Needs_Activation_Record
5149 -- Associated_Storage_Pool $$$
5150 -- Interface_Name $$$
21d27997 5151 -- (plus type attributes)
70482933
RK
5152
5153 -- E_Access_Type
5154 -- E_Access_Subtype
a7cadd18
BD
5155 -- Direct_Primitive_Operations $$$ type
5156 -- Master_Id
5157 -- Directly_Designated_Type
5158 -- Associated_Storage_Pool (base type only)
5159 -- Finalization_Master (base type only)
5160 -- Storage_Size_Variable (base type only)
5161 -- Has_Pragma_Controlled (base type only)
5162 -- Has_Storage_Size_Clause (base type only)
5163 -- Is_Access_Constant
5164 -- Is_Local_Anonymous_Access
5165 -- Is_Pure_Unit_Access_Type
5166 -- No_Pool_Assigned (base type only)
5167 -- No_Strict_Aliasing (base type only)
5168 -- Is_Param_Block_Component_Type (base type only)
70482933
RK
5169 -- (plus type attributes)
5170
5171 -- E_Access_Attribute_Type
a7cadd18
BD
5172 -- Renamed_Entity $$$
5173 -- Directly_Designated_Type
70482933
RK
5174 -- (plus type attributes)
5175
5176 -- E_Allocator_Type
a7cadd18
BD
5177 -- Directly_Designated_Type
5178 -- Associated_Storage_Pool $$$
70482933
RK
5179 -- (plus type attributes)
5180
af4b9434
AC
5181 -- E_Anonymous_Access_Subprogram_Type
5182 -- E_Anonymous_Access_Protected_Subprogram_Type
a7cadd18
BD
5183 -- Interface_Name $$$ E_Anonymous_Access_Subprogram_Type
5184 -- Directly_Designated_Type
5185 -- Storage_Size_Variable is this needed ???
5186 -- Can_Use_Internal_Rep
5187 -- Needs_Activation_Record
ce0bead3
HK
5188 -- (plus type attributes)
5189
70482933 5190 -- E_Anonymous_Access_Type
a7cadd18
BD
5191 -- Directly_Designated_Type
5192 -- Finalization_Master
5193 -- Storage_Size_Variable is this needed ???
5194 -- Associated_Storage_Pool $$$
70482933
RK
5195 -- (plus type attributes)
5196
5197 -- E_Array_Type
5198 -- E_Array_Subtype
a7cadd18
BD
5199 -- First_Entity $$$
5200 -- Direct_Primitive_Operations $$$ subtype
5201 -- Renamed_Object $$$ E_Array_Subtype
5202 -- First_Index
5203 -- Default_Aspect_Component_Value (base type only)
5204 -- Component_Type (base type only)
5205 -- Original_Array_Type
5206 -- Component_Size (base type only)
5207 -- Packed_Array_Impl_Type
5208 -- Related_Array_Object
5209 -- Predicated_Parent (subtype only)
5210 -- Component_Alignment (special) (base type only)
5211 -- Has_Component_Size_Clause (base type only)
5212 -- Has_Pragma_Pack (impl base type only)
5213 -- Is_Constrained
5214 -- Reverse_Storage_Order (base type only)
5215 -- SSO_Set_High_By_Default (base type only)
5216 -- SSO_Set_Low_By_Default (base type only)
5217 -- Next_Index (synth)
5218 -- Number_Dimensions (synth)
fdce4bb7 5219 -- (plus type attributes)
70482933
RK
5220
5221 -- E_Block
a7cadd18
BD
5222 -- Renamed_Entity $$$
5223 -- Renamed_Object $$$
5224 -- Return_Applies_To
5225 -- Block_Node
5226 -- First_Entity
5227 -- Last_Entity
5228 -- Scope_Depth_Value
5229 -- Entry_Cancel_Parameter
5230 -- Contains_Ignored_Ghost_Code
5231 -- Delay_Cleanups
5232 -- Discard_Names
5233 -- Has_Master_Entity
5234 -- Has_Nested_Block_With_Handler
5235 -- Is_Exception_Handler
5236 -- Sec_Stack_Needed_For_Return
5237 -- Uses_Sec_Stack
f937473f 5238 -- Scope_Depth (synth)
70482933
RK
5239
5240 -- E_Class_Wide_Type
5241 -- E_Class_Wide_Subtype
a7cadd18
BD
5242 -- Direct_Primitive_Operations
5243 -- Cloned_Subtype (subtype case only)
5244 -- First_Entity
5245 -- Equivalent_Type (always Empty for type)
5246 -- Non_Limited_View
5247 -- Last_Entity
5248 -- SSO_Set_High_By_Default (base type only)
5249 -- SSO_Set_Low_By_Default (base type only)
5250 -- Corresponding_Remote_Type $$$ type
5251 -- Renamed_Entity $$$ type
5252 -- First_Component (synth)
5253 -- First_Component_Or_Discriminant (synth)
5254 -- Has_Non_Limited_View (synth)
a4100e55 5255 -- (plus type attributes)
70482933
RK
5256
5257 -- E_Component
a7cadd18
BD
5258 -- Linker_Section_Pragma $$$
5259 -- Normalized_First_Bit
5260 -- Current_Value (always Empty)
a7cadd18
BD
5261 -- Component_Bit_Offset
5262 -- Esize
5263 -- Component_Clause
5264 -- Normalized_Position
5265 -- DT_Entry_Count
5266 -- Entry_Formal
5267 -- Prival
5268 -- Renamed_Object (always Empty)
5269 -- Discriminant_Checking_Func
5270 -- Corresponding_Record_Component
5271 -- Original_Record_Component
5272 -- DT_Offset_To_Top_Func
5273 -- Related_Type
5274 -- Has_Biased_Representation
5275 -- Has_Per_Object_Constraint
5276 -- Is_Atomic
5277 -- Is_Independent
5278 -- Is_Return_Object
5279 -- Is_Tag
5280 -- Is_Volatile
5281 -- Is_Volatile_Full_Access
5282 -- Treat_As_Volatile
b120ca61 5283 -- Is_Full_Access (synth)
f937473f
RD
5284 -- Next_Component (synth)
5285 -- Next_Component_Or_Discriminant (synth)
70482933
RK
5286
5287 -- E_Constant
5288 -- E_Loop_Parameter
a7cadd18
BD
5289 -- Current_Value (always Empty)
5290 -- Discriminal_Link
5291 -- Full_View
5292 -- Esize
5293 -- Extra_Accessibility (constants only)
5294 -- Alignment
5295 -- Status_Flag_Or_Transient_Decl
5296 -- Actual_Subtype
5297 -- Renamed_Object
5298 -- Renamed_Entity $$$
5299 -- Size_Check_Code (constants only)
5300 -- Prival_Link (privals only)
5301 -- Interface_Name (constants only)
5302 -- Related_Type (constants only)
5303 -- Initialization_Statements
5304 -- BIP_Initialization_Call
5305 -- Last_Aggregate_Assignment
5306 -- Activation_Record_Component
5307 -- Encapsulating_State (constants only)
5308 -- Linker_Section_Pragma
5309 -- Contract (constants only)
5310 -- SPARK_Pragma (constants only)
5311 -- Has_Alignment_Clause
5312 -- Has_Atomic_Components
5313 -- Has_Biased_Representation
5314 -- Has_Completion (constants only)
5315 -- Has_Independent_Components
5316 -- Has_Size_Clause
5317 -- Has_Thunks (constants only)
5318 -- Has_Volatile_Components
5319 -- Is_Atomic
5320 -- Is_Elaboration_Checks_OK_Id (constants only)
5321 -- Is_Elaboration_Warnings_OK_Id (constants only)
5322 -- Is_Eliminated
5323 -- Is_Finalized_Transient
5324 -- Is_Ignored_Transient
5325 -- Is_Independent
5326 -- Is_Return_Object
5327 -- Is_True_Constant
5328 -- Is_Uplevel_Referenced_Entity
5329 -- Is_Volatile
5330 -- Is_Volatile_Full_Access
5331 -- Optimize_Alignment_Space (constants only)
5332 -- Optimize_Alignment_Time (constants only)
5333 -- SPARK_Pragma_Inherited (constants only)
5334 -- Stores_Attribute_Old_Prefix (constants only)
5335 -- Treat_As_Volatile
5336 -- Address_Clause (synth)
5337 -- Alignment_Clause (synth)
5338 -- Is_Elaboration_Target (synth)
5339 -- Is_Full_Access (synth)
5340 -- Size_Clause (synth)
70482933
RK
5341
5342 -- E_Decimal_Fixed_Point_Type
82a7daa3 5343 -- E_Decimal_Fixed_Point_Subtype
a7cadd18
BD
5344 -- Scale_Value
5345 -- Digits_Value
5346 -- Scalar_Range
5347 -- Delta_Value
5348 -- Small_Value
5349 -- Static_Real_Or_String_Predicate
5350 -- Has_Machine_Radix_Clause
5351 -- Machine_Radix_10
5087048c 5352 -- Aft_Value (synth)
f937473f
RD
5353 -- Type_Low_Bound (synth)
5354 -- Type_High_Bound (synth)
a4100e55 5355 -- (plus type attributes)
70482933
RK
5356
5357 -- E_Discriminant
a7cadd18
BD
5358 -- Normalized_First_Bit
5359 -- Current_Value (always Empty)
a7cadd18
BD
5360 -- Component_Bit_Offset
5361 -- Esize
5362 -- Component_Clause
5363 -- Normalized_Position
5364 -- Discriminant_Number
5365 -- Discriminal
5366 -- Renamed_Object (always Empty)
5367 -- Corresponding_Discriminant
5368 -- Discriminant_Default_Value
5369 -- Corresponding_Record_Component
5370 -- Original_Record_Component
5371 -- CR_Discriminant
5372 -- Is_Completely_Hidden
5373 -- Is_Return_Object
5374 -- Entry_Formal $$$
5375 -- Linker_Section_Pragma $$$
f937473f
RD
5376 -- Next_Component_Or_Discriminant (synth)
5377 -- Next_Discriminant (synth)
5378 -- Next_Stored_Discriminant (synth)
70482933
RK
5379
5380 -- E_Entry
5381 -- E_Entry_Family
a7cadd18
BD
5382 -- Protected_Body_Subprogram
5383 -- Barrier_Function
5384 -- Elaboration_Entity
a7cadd18
BD
5385 -- Entry_Parameters_Type
5386 -- First_Entity
5387 -- Alias (for entry only. Empty)
5388 -- Last_Entity
5389 -- Accept_Address
5390 -- Scope_Depth_Value
5391 -- Protection_Object (protected kind)
5392 -- Contract_Wrapper
5393 -- Extra_Formals
5394 -- Contract
5395 -- SPARK_Pragma (protected kind)
5396 -- Default_Expressions_Processed
5397 -- Entry_Accepted
5398 -- Has_Yield_Aspect
5399 -- Has_Expanded_Contract
5400 -- Ignore_SPARK_Mode_Pragmas
5401 -- Is_Elaboration_Checks_OK_Id
5402 -- Is_Elaboration_Warnings_OK_Id
5403 -- Is_Entry_Wrapper
5404 -- Needs_No_Actuals
5405 -- Sec_Stack_Needed_For_Return
5406 -- SPARK_Pragma_Inherited (protected kind)
5407 -- Uses_Sec_Stack
5408 -- Renamed_Entity $$$
5409 -- Address_Clause (synth)
5410 -- Entry_Index_Type (synth)
5411 -- First_Formal (synth)
5412 -- First_Formal_With_Extras (synth)
5413 -- Is_Elaboration_Target (synth)
5414 -- Last_Formal (synth)
5415 -- Number_Formals (synth)
5416 -- Scope_Depth (synth)
70482933
RK
5417
5418 -- E_Entry_Index_Parameter
a7cadd18 5419 -- Entry_Index_Constant
70482933
RK
5420
5421 -- E_Enumeration_Literal
a7cadd18
BD
5422 -- Enumeration_Pos
5423 -- Enumeration_Rep
5424 -- Alias
5425 -- Enumeration_Rep_Expr
5426 -- Interface_Name $$$
5427 -- Renamed_Object $$$
5428 -- Esize $$$
5429 -- Renamed_Entity $$$
5430 -- Next_Literal (synth)
70482933
RK
5431
5432 -- E_Enumeration_Type
5433 -- E_Enumeration_Subtype
a7cadd18
BD
5434 -- First_Entity $$$ type
5435 -- Renamed_Object $$$
5436 -- Lit_Strings (root type only)
5437 -- First_Literal
5438 -- Lit_Indexes (root type only)
5439 -- Default_Aspect_Value (base type only)
5440 -- Scalar_Range
5441 -- Lit_Hash (root type only)
5442 -- Enum_Pos_To_Rep (type only)
5443 -- Static_Discrete_Predicate
5444 -- Has_Biased_Representation
5445 -- Has_Contiguous_Rep
5446 -- Has_Enumeration_Rep_Clause
5447 -- Has_Pragma_Ordered (base type only)
5448 -- Nonzero_Is_True (base type only)
5449 -- No_Predicate_On_Actual
5450 -- No_Dynamic_Predicate_On_Actual
5451 -- Type_Low_Bound (synth)
5452 -- Type_High_Bound (synth)
a4100e55 5453 -- (plus type attributes)
70482933
RK
5454
5455 -- E_Exception
a7cadd18
BD
5456 -- Esize
5457 -- Alignment
5458 -- Renamed_Entity
5459 -- Register_Exception_Call
5460 -- Interface_Name
5461 -- Activation_Record_Component
5462 -- Discard_Names
5463 -- Is_Raised
5464 -- Renamed_Object $$$
70482933
RK
5465
5466 -- E_Exception_Type
a7cadd18 5467 -- Equivalent_Type
a4100e55 5468 -- (plus type attributes)
70482933
RK
5469
5470 -- E_Floating_Point_Type
5471 -- E_Floating_Point_Subtype
a7cadd18
BD
5472 -- Digits_Value
5473 -- Float_Rep (Float_Rep_Kind)
5474 -- Default_Aspect_Value (base type only)
5475 -- Scalar_Range
5476 -- Static_Real_Or_String_Predicate
5477 -- Machine_Emax_Value (synth)
5478 -- Machine_Emin_Value (synth)
5479 -- Machine_Mantissa_Value (synth)
5480 -- Machine_Radix_Value (synth)
5481 -- Model_Emin_Value (synth)
5482 -- Model_Epsilon_Value (synth)
5483 -- Model_Mantissa_Value (synth)
5484 -- Model_Small_Value (synth)
5485 -- Safe_Emax_Value (synth)
5486 -- Safe_First_Value (synth)
5487 -- Safe_Last_Value (synth)
5488 -- Type_Low_Bound (synth)
5489 -- Type_High_Bound (synth)
a4100e55 5490 -- (plus type attributes)
70482933
RK
5491
5492 -- E_Function
5493 -- E_Generic_Function
a7cadd18 5494 -- Mechanism (Mechanism_Type)
a7cadd18
BD
5495 -- Handler_Records (non-generic case only)
5496 -- Protected_Body_Subprogram
5497 -- Next_Inlined_Subprogram
5498 -- Elaboration_Entity (not implicit /=)
a7cadd18
BD
5499 -- DT_Position
5500 -- DTC_Entity
5501 -- First_Entity
5502 -- Alias (non-generic case only)
5503 -- Renamed_Entity
5504 -- Renamed_Object $$$
5505 -- Extra_Accessibility_Of_Result (non-generic case only)
5506 -- Last_Entity
5507 -- Interface_Name
5508 -- Scope_Depth_Value
5509 -- Generic_Renamings (for an instance)
5510 -- Inner_Instances (generic case only)
5511 -- Inner_Instances $$$ also E_Function
5512 -- Protection_Object (for concurrent kind)
5513 -- Subps_Index (non-generic case only)
5514 -- Interface_Alias
c37c13e1 5515 -- LSP_Subprogram (non-generic case only)
a7cadd18
BD
5516 -- Overridden_Operation
5517 -- Wrapped_Entity (non-generic case only)
5518 -- Extra_Formals
5519 -- Anonymous_Masters (non-generic case only)
5520 -- Corresponding_Equality (implicit /= only)
5521 -- Thunk_Entity (thunk case only)
5522 -- Corresponding_Procedure (generate C code only)
5523 -- Linker_Section_Pragma
5524 -- Contract
5525 -- Import_Pragma (non-generic case only)
475e1d24
JM
5526 -- Class_Postconditions
5527 -- Class_Preconditions
5528 -- Class_Preconditions_Subprogram
5529 -- Dynamic_Call_Helper
5530 -- Ignored_Class_Preconditions
5531 -- Ignored_Class_Postconditions
5532 -- Indirect_Call_Wrapper
5533 -- Static_Call_Helper
a7cadd18
BD
5534 -- Protected_Subprogram (non-generic case only)
5535 -- SPARK_Pragma
5536 -- Original_Protected_Subprogram
5537 -- Body_Needed_For_SAL
5538 -- Contains_Ignored_Ghost_Code
5539 -- Default_Expressions_Processed
5540 -- Delay_Cleanups
5541 -- Delay_Subprogram_Descriptors
5542 -- Discard_Names
5543 -- Elaboration_Entity_Required
5544 -- Has_Completion
5545 -- Has_Controlling_Result
5546 -- Has_Expanded_Contract (non-generic case only)
5547 -- Has_Master_Entity
5548 -- Has_Missing_Return
5549 -- Has_Nested_Block_With_Handler
5550 -- Has_Nested_Subprogram
5551 -- Has_Out_Or_In_Out_Parameter
5552 -- Has_Recursive_Call
5553 -- Has_Yield_Aspect
5554 -- Ignore_SPARK_Mode_Pragmas
5555 -- Is_Abstract_Subprogram (non-generic case only)
5556 -- Is_Called (non-generic case only)
8e1e74a1 5557 -- Is_Class_Wide_Wrapper
a7cadd18
BD
5558 -- Is_Constructor
5559 -- Is_CUDA_Kernel (non-generic case only)
5560 -- Is_DIC_Procedure (non-generic case only)
5561 -- Is_Discrim_SO_Function
5562 -- Is_Discriminant_Check_Function
5563 -- Is_Elaboration_Checks_OK_Id
5564 -- Is_Elaboration_Warnings_OK_Id
5565 -- Is_Eliminated
5566 -- Is_Generic_Actual_Subprogram (non-generic case only)
5567 -- Is_Hidden_Non_Overridden_Subpgm (non-generic case only)
5568 -- Is_Initial_Condition_Procedure (non-generic case only)
5569 -- Is_Inlined_Always (non-generic case only)
5570 -- Is_Instantiated (generic case only)
5571 -- Is_Intrinsic_Subprogram
5572 -- Is_Invariant_Procedure (non-generic case only)
5573 -- Is_Machine_Code_Subprogram (non-generic case only)
5574 -- Is_Partial_Invariant_Procedure (non-generic case only)
5575 -- Is_Predicate_Function (non-generic case only)
a7cadd18
BD
5576 -- Is_Primitive
5577 -- Is_Primitive_Wrapper (non-generic case only)
5578 -- Is_Private_Descendant
5579 -- Is_Private_Primitive (non-generic case only)
5580 -- Is_Pure
5581 -- Is_Visible_Lib_Unit
c37c13e1 5582 -- Is_Wrapper
a7cadd18
BD
5583 -- Needs_No_Actuals
5584 -- Requires_Overriding (non-generic case only)
5585 -- Return_Present
5586 -- Returns_By_Ref
5587 -- Rewritten_For_C (generate C code only)
5588 -- Sec_Stack_Needed_For_Return
5589 -- SPARK_Pragma_Inherited
5590 -- Uses_Sec_Stack
5591 -- Address_Clause (synth)
5592 -- First_Formal (synth)
5593 -- First_Formal_With_Extras (synth)
5594 -- Is_Elaboration_Target (synth)
5595 -- Last_Formal (synth)
5596 -- Number_Formals (synth)
5597 -- Scope_Depth (synth)
70482933
RK
5598
5599 -- E_General_Access_Type
a7cadd18
BD
5600 -- First_Entity $$$
5601 -- Renamed_Entity $$$
5602 -- Master_Id
5603 -- Directly_Designated_Type
5604 -- Associated_Storage_Pool (root type only)
5605 -- Finalization_Master (root type only)
5606 -- Storage_Size_Variable (base type only)
70482933
RK
5607 -- (plus type attributes)
5608
5609 -- E_Generic_In_Parameter
5610 -- E_Generic_In_Out_Parameter
a7cadd18
BD
5611 -- Current_Value (always Empty)
5612 -- Entry_Component
5613 -- Actual_Subtype
5614 -- Renamed_Object (always Empty)
5615 -- Default_Value
5616 -- Protected_Formal
5617 -- Is_Controlling_Formal
5618 -- Is_Return_Object
5619 -- Parameter_Mode (synth)
70482933
RK
5620
5621 -- E_Incomplete_Type
6e443c90 5622 -- E_Incomplete_Subtype
a7cadd18
BD
5623 -- Direct_Primitive_Operations
5624 -- Non_Limited_View
5625 -- Private_Dependents
5626 -- Discriminant_Constraint
5627 -- Stored_Constraint
5628 -- First_Entity $$$
5629 -- Last_Entity $$$
5630 -- Has_Non_Limited_View (synth)
70482933
RK
5631 -- (plus type attributes)
5632
5633 -- E_In_Parameter
5634 -- E_In_Out_Parameter
5635 -- E_Out_Parameter
a7cadd18
BD
5636 -- Linker_Section_Pragma $$$
5637 -- Mechanism (Mechanism_Type)
5638 -- Current_Value
5639 -- Discriminal_Link (discriminals only)
5640 -- Entry_Component
5641 -- Esize
5642 -- Extra_Accessibility
5643 -- Alignment
5644 -- Extra_Formal
5645 -- Unset_Reference
5646 -- Actual_Subtype
5647 -- Renamed_Object
5648 -- Spec_Entity
5649 -- Default_Value
5650 -- Default_Expr_Function
5651 -- Protected_Formal
5652 -- Extra_Constrained
5653 -- Minimum_Accessibility
5654 -- Last_Assignment (OUT, IN-OUT only)
5655 -- Activation_Record_Component
5656 -- Has_Initial_Value
5657 -- Is_Controlling_Formal
5658 -- Is_Only_Out_Parameter
5659 -- Low_Bound_Tested
5660 -- Is_Return_Object
5661 -- Is_Activation_Record
5662 -- Parameter_Mode (synth)
70482933
RK
5663
5664 -- E_Label
a7cadd18
BD
5665 -- Renamed_Object $$$
5666 -- Renamed_Entity $$$
5667 -- Enclosing_Scope
5668 -- Reachable
70482933
RK
5669
5670 -- E_Limited_Private_Type
5671 -- E_Limited_Private_Subtype
a7cadd18
BD
5672 -- Scalar_Range $$$ type
5673 -- First_Entity
5674 -- Private_Dependents
5675 -- Underlying_Full_View
5676 -- Last_Entity
5677 -- Discriminant_Constraint
5678 -- Stored_Constraint
5679 -- Has_Completion
70482933
RK
5680 -- (plus type attributes)
5681
5682 -- E_Loop
a7cadd18
BD
5683 -- First_Exit_Statement
5684 -- Has_Exit
5685 -- Has_Loop_Entry_Attributes
5686 -- Has_Master_Entity
5687 -- Has_Nested_Block_With_Handler
5688 -- Uses_Sec_Stack
5689 -- First_Entity $$$
5690 -- Last_Entity $$$
5691 -- Renamed_Object $$$
70482933
RK
5692
5693 -- E_Modular_Integer_Type
5694 -- E_Modular_Integer_Subtype
a7cadd18
BD
5695 -- Modulus (base type only)
5696 -- Default_Aspect_Value (base type only)
5697 -- Original_Array_Type
5698 -- Scalar_Range
5699 -- Static_Discrete_Predicate
5700 -- Non_Binary_Modulus (base type only)
5701 -- Has_Biased_Representation
5702 -- Has_Shift_Operator (base type only)
5703 -- No_Predicate_On_Actual
5704 -- No_Dynamic_Predicate_On_Actual
5705 -- Type_Low_Bound (synth)
5706 -- Type_High_Bound (synth)
70482933
RK
5707 -- (plus type attributes)
5708
5709 -- E_Named_Integer
a7cadd18 5710 -- Renamed_Object $$$
70482933
RK
5711
5712 -- E_Named_Real
70482933
RK
5713
5714 -- E_Operator
a7cadd18
BD
5715 -- First_Entity
5716 -- Alias
5717 -- Extra_Accessibility_Of_Result
5718 -- Last_Entity
5719 -- Subps_Index
5720 -- Overridden_Operation
5721 -- Linker_Section_Pragma
5722 -- Contract
5723 -- Import_Pragma
c37c13e1 5724 -- LSP_Subprogram
a7cadd18
BD
5725 -- SPARK_Pragma
5726 -- Default_Expressions_Processed
5727 -- Has_Nested_Subprogram
5728 -- Ignore_SPARK_Mode_Pragmas
8e1e74a1 5729 -- Is_Class_Wide_Wrapper
a7cadd18
BD
5730 -- Is_Elaboration_Checks_OK_Id
5731 -- Is_Elaboration_Warnings_OK_Id
5732 -- Is_Intrinsic_Subprogram
5733 -- Is_Machine_Code_Subprogram
5734 -- Is_Primitive
5735 -- Is_Pure
c37c13e1 5736 -- Is_Wrapper
a7cadd18
BD
5737 -- SPARK_Pragma_Inherited
5738 -- Interface_Name $$$
5739 -- Renamed_Entity $$$
5740 -- Renamed_Object $$$
5741 -- Is_Elaboration_Target (synth)
21d27997
RD
5742 -- Aren't there more flags and fields? seems like this list should be
5743 -- more similar to the E_Function list, which is much longer ???
70482933
RK
5744
5745 -- E_Ordinary_Fixed_Point_Type
5746 -- E_Ordinary_Fixed_Point_Subtype
a7cadd18
BD
5747 -- Delta_Value
5748 -- Default_Aspect_Value (base type only)
5749 -- Scalar_Range
5750 -- Static_Real_Or_String_Predicate
5751 -- Small_Value
5752 -- Has_Small_Clause
5753 -- Aft_Value (synth)
5754 -- Type_Low_Bound (synth)
5755 -- Type_High_Bound (synth)
a4100e55 5756 -- (plus type attributes)
70482933
RK
5757
5758 -- E_Package
5759 -- E_Generic_Package
a7cadd18 5760 -- Dependent_Instances (for an instance)
a7cadd18
BD
5761 -- Handler_Records (non-generic case only)
5762 -- Generic_Homonym (generic case only)
5763 -- Associated_Formal_Package
5764 -- Elaboration_Entity
5765 -- Related_Instance (non-generic case only)
5766 -- First_Private_Entity
5767 -- First_Entity
5768 -- Renamed_Entity
5769 -- Renamed_Object $$$
5770 -- Body_Entity
5771 -- Last_Entity
5772 -- Interface_Name
5773 -- Scope_Depth_Value
5774 -- Generic_Renamings (for an instance)
5775 -- Inner_Instances (generic case only)
5776 -- Inner_Instances $$$ also E_Package
5777 -- Limited_View (non-generic/instance)
5778 -- Incomplete_Actuals (for an instance)
5779 -- Abstract_States
5780 -- Package_Instantiation
5781 -- Current_Use_Clause
5782 -- Finalizer (non-generic case only)
5783 -- Anonymous_Masters (non-generic case only)
5784 -- Contract
5785 -- SPARK_Pragma
5786 -- SPARK_Aux_Pragma
5787 -- Body_Needed_For_Inlining
5788 -- Body_Needed_For_SAL
5789 -- Contains_Ignored_Ghost_Code
5790 -- Delay_Subprogram_Descriptors
5791 -- Discard_Names
5792 -- Elaborate_Body_Desirable (non-generic case only)
5793 -- Elaboration_Entity_Required
5794 -- From_Limited_With
5795 -- Has_All_Calls_Remote
5796 -- Has_Completion
5797 -- Has_Forward_Instantiation
5798 -- Has_Master_Entity
5799 -- Has_RACW (non-generic case only)
5800 -- Ignore_SPARK_Mode_Pragmas
5801 -- Is_Called (non-generic case only)
5802 -- Is_Elaboration_Checks_OK_Id
5803 -- Is_Elaboration_Warnings_OK_Id
5804 -- Is_Instantiated
5805 -- In_Package_Body
5806 -- Is_Private_Descendant
5807 -- In_Use
5808 -- Is_Visible_Lib_Unit
5809 -- Renamed_In_Spec (non-generic case only)
5810 -- SPARK_Aux_Pragma_Inherited
5811 -- SPARK_Pragma_Inherited
5812 -- Static_Elaboration_Desired (non-generic case only)
5813 -- Renamed_Object $$$
5814 -- Has_Non_Null_Abstract_State (synth)
5815 -- Has_Null_Abstract_State (synth)
5816 -- Is_Elaboration_Target (synth)
5817 -- Is_Wrapper_Package (synth) (non-generic case only)
5818 -- Has_Limited_View (synth) (non-generic case only)
5819 -- Scope_Depth (synth)
70482933
RK
5820
5821 -- E_Package_Body
a7cadd18
BD
5822 -- Handler_Records (non-generic case only)
5823 -- Related_Instance (non-generic case only)
5824 -- First_Entity
5825 -- Spec_Entity
5826 -- Last_Entity
5827 -- Scope_Depth_Value
5828 -- Finalizer (non-generic case only)
5829 -- Contract
5830 -- SPARK_Pragma
5831 -- SPARK_Aux_Pragma
5832 -- Contains_Ignored_Ghost_Code
5833 -- Delay_Subprogram_Descriptors
5834 -- Ignore_SPARK_Mode_Pragmas
5835 -- SPARK_Aux_Pragma_Inherited
5836 -- SPARK_Pragma_Inherited
5837 -- Renamed_Entity $$$
5838 -- Scope_Depth (synth)
70482933
RK
5839
5840 -- E_Private_Type
5841 -- E_Private_Subtype
a7cadd18
BD
5842 -- Scalar_Range $$$ type
5843 -- Direct_Primitive_Operations
5844 -- First_Entity
5845 -- Private_Dependents
5846 -- Underlying_Full_View
5847 -- Last_Entity
5848 -- Discriminant_Constraint
5849 -- Stored_Constraint
5850 -- Has_Completion
5851 -- Is_Controlled_Active (base type only)
5852 -- $$$above in (plus type attributes)
70482933
RK
5853 -- (plus type attributes)
5854
5855 -- E_Procedure
5856 -- E_Generic_Procedure
a7cadd18 5857 -- Associated_Node_For_Itype $$$ E_Procedure
a7cadd18
BD
5858 -- Handler_Records (non-generic case only)
5859 -- Protected_Body_Subprogram
5860 -- Next_Inlined_Subprogram
5861 -- Elaboration_Entity
a7cadd18
BD
5862 -- DT_Position
5863 -- DTC_Entity
5864 -- First_Entity
5865 -- Alias (non-generic case only)
5866 -- Renamed_Entity
5867 -- Renamed_Object $$$
5868 -- Receiving_Entry (non-generic case only)
5869 -- Last_Entity
5870 -- Interface_Name
5871 -- Scope_Depth_Value
5872 -- Generic_Renamings (for an instance)
5873 -- Inner_Instances (generic case only)
5874 -- Inner_Instances $$$ also E_Procedure
5875 -- Protection_Object (for concurrent kind)
5876 -- Subps_Index (non-generic case only)
5877 -- Interface_Alias
c37c13e1 5878 -- LSP_Subprogram (non-generic case only)
a7cadd18
BD
5879 -- Overridden_Operation (never for init proc)
5880 -- Wrapped_Entity (non-generic case only)
5881 -- Extra_Formals
5882 -- Anonymous_Masters (non-generic case only)
5883 -- Static_Initialization (init_proc only)
5884 -- Thunk_Entity (thunk case only)
5885 -- Corresponding_Function (generate C code only)
5886 -- Linker_Section_Pragma
5887 -- Contract
5888 -- Import_Pragma (non-generic case only)
475e1d24
JM
5889 -- Class_Postconditions
5890 -- Class_Preconditions
5891 -- Class_Preconditions_Subprogram
5892 -- Dynamic_Call_Helper
5893 -- Ignored_Class_Preconditions
5894 -- Ignored_Class_Postconditions
5895 -- Indirect_Call_Wrapper
5896 -- Static_Call_Helper
a7cadd18
BD
5897 -- Protected_Subprogram (non-generic case only)
5898 -- SPARK_Pragma
5899 -- Original_Protected_Subprogram
5900 -- Body_Needed_For_SAL
5901 -- Contains_Ignored_Ghost_Code
5902 -- Delay_Cleanups $$$Dup below
5903 -- Discard_Names $$$Dup below
5904 -- Elaboration_Entity_Required
5905 -- Default_Expressions_Processed
5906 -- Delay_Cleanups
5907 -- Delay_Subprogram_Descriptors
5908 -- Discard_Names
5909 -- Has_Completion
5910 -- Has_Expanded_Contract (non-generic case only)
5911 -- Has_Master_Entity
5912 -- Has_Nested_Block_With_Handler
5913 -- Has_Nested_Subprogram
5914 -- Has_Yield_Aspect
5915 -- Ignore_SPARK_Mode_Pragmas
5916 -- Is_Abstract_Subprogram (non-generic case only)
5917 -- Is_Asynchronous
5918 -- Is_Called (non-generic case only)
8e1e74a1 5919 -- Is_Class_Wide_Wrapper
a7cadd18
BD
5920 -- Is_Constructor
5921 -- Is_CUDA_Kernel
5922 -- Is_DIC_Procedure (non-generic case only)
5923 -- Is_Elaboration_Checks_OK_Id
5924 -- Is_Elaboration_Warnings_OK_Id
5925 -- Is_Eliminated
5926 -- Is_Generic_Actual_Subprogram (non-generic case only)
5927 -- Is_Hidden_Non_Overridden_Subpgm (non-generic case only)
5928 -- Is_Initial_Condition_Procedure (non-generic case only)
5929 -- Is_Inlined_Always (non-generic case only)
5930 -- Is_Instantiated (generic case only)
5931 -- Is_Interrupt_Handler
5932 -- Is_Intrinsic_Subprogram
5933 -- Is_Invariant_Procedure (non-generic case only)
5934 -- Is_Machine_Code_Subprogram (non-generic case only)
5935 -- Is_Null_Init_Proc
5936 -- Is_Partial_DIC_Procedure (synth) (non-generic case only)
5937 -- Is_Partial_Invariant_Procedure (non-generic case only)
5938 -- Is_Predicate_Function (non-generic case only)
a7cadd18
BD
5939 -- Is_Primitive
5940 -- Is_Primitive_Wrapper (non-generic case only)
5941 -- Is_Private_Descendant
5942 -- Is_Private_Primitive (non-generic case only)
5943 -- Is_Pure
c37c13e1 5944 -- Is_Wrapper
a7cadd18
BD
5945 -- Is_Valued_Procedure
5946 -- Is_Visible_Lib_Unit
5947 -- Needs_No_Actuals
5948 -- No_Return
5949 -- Requires_Overriding (non-generic case only)
5950 -- Sec_Stack_Needed_For_Return
5951 -- SPARK_Pragma_Inherited
5952 -- Entry_Parameters_Type $$$
5953 -- Address_Clause (synth)
5954 -- First_Formal (synth)
5955 -- First_Formal_With_Extras (synth)
5956 -- Is_Elaboration_Target (synth)
5957 -- Is_Finalizer (synth)
5958 -- Last_Formal (synth)
5959 -- Number_Formals (synth)
70482933
RK
5960
5961 -- E_Protected_Body
a7cadd18
BD
5962 -- SPARK_Pragma
5963 -- Ignore_SPARK_Mode_Pragmas
5964 -- SPARK_Pragma_Inherited
70482933
RK
5965 -- (any others??? First/Last Entity, Scope_Depth???)
5966
a7cadd18 5967 -- E_Protected_Object$$$No such thing
70482933
RK
5968
5969 -- E_Protected_Type
5970 -- E_Protected_Subtype
a7cadd18
BD
5971 -- Direct_Primitive_Operations
5972 -- First_Private_Entity
5973 -- First_Entity
5974 -- Corresponding_Record_Type
5975 -- Entry_Bodies_Array
5976 -- Last_Entity
5977 -- Discriminant_Constraint
5978 -- Scope_Depth_Value
5979 -- Stored_Constraint
5980 -- Anonymous_Object
5981 -- Contract
5982 -- Entry_Max_Queue_Lengths_Array
5983 -- SPARK_Aux_Pragma
5984 -- Ignore_SPARK_Mode_Pragmas
5985 -- SPARK_Aux_Pragma_Inherited
5986 -- Uses_Lock_Free
5987 -- First_Component (synth)
5988 -- First_Component_Or_Discriminant (synth)
5989 -- Has_Entries (synth)
5990 -- Has_Interrupt_Handler (synth)
5991 -- Number_Entries (synth)
5992 -- Scope_Depth (synth)
75b87c16 5993 -- (plus type attributes)
70482933
RK
5994
5995 -- E_Record_Type
5996 -- E_Record_Subtype
a7cadd18
BD
5997 -- Renamed_Entity $$$ type
5998 -- Interface_Name $$$ type
5999 -- Direct_Primitive_Operations
6000 -- Access_Disp_Table (base type only)
6001 -- Cloned_Subtype (subtype case only)
6002 -- First_Entity
6003 -- Corresponding_Concurrent_Type
6004 -- Parent_Subtype (base type only)
6005 -- Last_Entity
6006 -- Discriminant_Constraint
6007 -- Corresponding_Remote_Type
6008 -- Stored_Constraint
6009 -- Interfaces
6010 -- Dispatch_Table_Wrappers (base type only)
6011 -- Underlying_Record_View (base type only)
6012 -- Access_Disp_Table_Elab_Flag (base type only)
6013 -- Predicated_Parent (subtype only)
6014 -- Component_Alignment (special) (base type only)
6015 -- C_Pass_By_Copy (base type only)
6016 -- Has_Dispatch_Table (base tagged type only)
6017 -- Has_Pragma_Pack (impl base type only)
6018 -- Has_Private_Ancestor
6019 -- Has_Private_Extension
6020 -- Has_Record_Rep_Clause (base type only)
6021 -- Has_Static_Discriminants (subtype only)
6022 -- Is_Class_Wide_Equivalent_Type
6023 -- Is_Concurrent_Record_Type
6024 -- Is_Constrained
6025 -- Is_Controlled_Active (base type only)
6026 -- $$$above in (plus type attributes)
6027 -- Is_Interface
6028 -- Is_Limited_Interface
6029 -- No_Reordering (base type only)
6030 -- Reverse_Bit_Order (base type only)
6031 -- Reverse_Storage_Order (base type only)
6032 -- SSO_Set_High_By_Default (base type only)
6033 -- SSO_Set_Low_By_Default (base type only)
6034 -- First_Component (synth)
6035 -- First_Component_Or_Discriminant (synth)
70482933
RK
6036 -- (plus type attributes)
6037
6038 -- E_Record_Type_With_Private
6039 -- E_Record_Subtype_With_Private
a7cadd18
BD
6040 -- Corresponding_Remote_Type $$$ E_Record_Subtype_With_Private
6041 -- Direct_Primitive_Operations
6042 -- First_Entity
6043 -- Private_Dependents
6044 -- Underlying_Full_View
6045 -- Last_Entity
6046 -- Discriminant_Constraint
6047 -- Stored_Constraint
6048 -- Interfaces
6049 -- Underlying_Record_View $$$ (base type only)
6050 -- Predicated_Parent (subtype only)
6051 -- Has_Completion
6052 -- Has_Private_Ancestor
6053 -- Has_Private_Extension
6054 -- Has_Record_Rep_Clause (base type only)
6055 -- Is_Concurrent_Record_Type
6056 -- Is_Constrained
6057 -- Is_Controlled_Active (base type only)
6058 -- $$$above in (plus type attributes)
6059 -- Is_Interface
6060 -- Is_Limited_Interface
6061 -- No_Reordering (base type only)
6062 -- Reverse_Bit_Order (base type only)
6063 -- Reverse_Storage_Order (base type only)
6064 -- SSO_Set_High_By_Default (base type only)
6065 -- SSO_Set_Low_By_Default (base type only)
6066 -- Corresponding_Remote_Type $$$ type
6067 -- First_Component (synth)
6068 -- First_Component_Or_Discriminant (synth)
70482933
RK
6069 -- (plus type attributes)
6070
6e443c90 6071 -- E_Return_Statement
a7cadd18
BD
6072 -- Return_Applies_To
6073 -- First_Entity $$$
6074 -- Last_Entity $$$
6e443c90 6075
70482933
RK
6076 -- E_Signed_Integer_Type
6077 -- E_Signed_Integer_Subtype
a7cadd18
BD
6078 -- Renamed_Object $$$ subtype
6079 -- Interface_Name $$$ subtype
6080 -- Direct_Primitive_Operations $$$ type
6081 -- First_Entity $$$
6082 -- Default_Aspect_Value (base type only)
6083 -- Scalar_Range
6084 -- Static_Discrete_Predicate
6085 -- Has_Biased_Representation
6086 -- Has_Shift_Operator (base type only)
6087 -- No_Predicate_On_Actual
6088 -- No_Dynamic_Predicate_On_Actual
6089 -- Type_Low_Bound (synth)
6090 -- Type_High_Bound (synth)
70482933
RK
6091 -- (plus type attributes)
6092
70482933 6093 -- E_String_Literal_Subtype
a7cadd18
BD
6094 -- String_Literal_Length
6095 -- First_Index (always Empty)
6096 -- String_Literal_Low_Bound
6097 -- Packed_Array_Impl_Type
70482933
RK
6098 -- (plus type attributes)
6099
6100 -- E_Subprogram_Body
a7cadd18
BD
6101 -- Mechanism
6102 -- First_Entity
6103 -- Corresponding_Protected_Entry
6104 -- Last_Entity
6105 -- Scope_Depth_Value
6106 -- Extra_Formals
6107 -- Anonymous_Masters
6108 -- Contract
6109 -- SPARK_Pragma
6110 -- Contains_Ignored_Ghost_Code
6111 -- SPARK_Pragma_Inherited
6112 -- Interface_Name $$$
6113 -- Renamed_Entity $$$
6114 -- Scope_Depth (synth)
70482933
RK
6115
6116 -- E_Subprogram_Type
a7cadd18
BD
6117 -- Extra_Accessibility_Of_Result
6118 -- Directly_Designated_Type
6119 -- Extra_Formals
6120 -- Access_Subprogram_Wrapper
6121 -- First_Formal (synth)
6122 -- First_Formal_With_Extras (synth)
6123 -- Last_Formal (synth)
6124 -- Number_Formals (synth)
6125 -- Returns_By_Ref
6126 -- First_Entity $$$
6127 -- Last_Entity $$$
6128 -- Interface_Name $$$
70482933
RK
6129 -- (plus type attributes)
6130
6131 -- E_Task_Body
a7cadd18
BD
6132 -- Contract
6133 -- SPARK_Pragma
6134 -- Ignore_SPARK_Mode_Pragmas
6135 -- SPARK_Pragma_Inherited
6136 -- First_Entity $$$
70482933
RK
6137 -- (any others??? First/Last Entity, Scope_Depth???)
6138
6139 -- E_Task_Type
6140 -- E_Task_Subtype
a7cadd18
BD
6141 -- Direct_Primitive_Operations
6142 -- First_Private_Entity
6143 -- First_Entity
6144 -- Corresponding_Record_Type
6145 -- Last_Entity
6146 -- Discriminant_Constraint
6147 -- Scope_Depth_Value
6148 -- Stored_Constraint
6149 -- Task_Body_Procedure
6150 -- Storage_Size_Variable (base type only)
6151 -- Relative_Deadline_Variable (base type only)
6152 -- Anonymous_Object
6153 -- Contract
6154 -- SPARK_Aux_Pragma
6155 -- Delay_Cleanups
6156 -- Has_Master_Entity
6157 -- Has_Storage_Size_Clause (base type only)
6158 -- Ignore_SPARK_Mode_Pragmas
6159 -- Is_Elaboration_Checks_OK_Id
6160 -- Is_Elaboration_Warnings_OK_Id
6161 -- SPARK_Aux_Pragma_Inherited
6162 -- First_Component (synth)
6163 -- First_Component_Or_Discriminant (synth)
6164 -- Has_Entries (synth)
6165 -- Is_Elaboration_Target (synth)
6166 -- Number_Entries (synth)
6167 -- Scope_Depth (synth)
70482933
RK
6168 -- (plus type attributes)
6169
6170 -- E_Variable
a7cadd18
BD
6171 -- Hiding_Loop_Variable
6172 -- Current_Value
6173 -- Part_Of_Constituents
6174 -- Part_Of_References
6175 -- Esize
6176 -- Extra_Accessibility
6177 -- Alignment
6178 -- Status_Flag_Or_Transient_Decl (transient object only)
6179 -- Unset_Reference
6180 -- Actual_Subtype
6181 -- Renamed_Object
6182 -- Renamed_Entity $$$
6183 -- Discriminal_Link $$$
6184 -- Size_Check_Code
6185 -- Prival_Link
6186 -- Interface_Name
6187 -- Shared_Var_Procs_Instance
6188 -- Extra_Constrained
6189 -- Related_Expression
6190 -- Debug_Renaming_Link
6191 -- Last_Assignment
6192 -- Related_Type
6193 -- Initialization_Statements
6194 -- BIP_Initialization_Call
6195 -- Last_Aggregate_Assignment
6196 -- Activation_Record_Component
6197 -- Encapsulating_State
6198 -- Linker_Section_Pragma
6199 -- Contract
6200 -- Anonymous_Designated_Type
6201 -- Validated_Object
6202 -- SPARK_Pragma
6203 -- Has_Alignment_Clause
6204 -- Has_Atomic_Components
6205 -- Has_Biased_Representation
6206 -- Has_Independent_Components
6207 -- Has_Initial_Value
6208 -- Has_Size_Clause
6209 -- Has_Volatile_Components
6210 -- Is_Atomic
6211 -- Is_Elaboration_Checks_OK_Id
6212 -- Is_Elaboration_Warnings_OK_Id
6213 -- Is_Eliminated
6214 -- Is_Finalized_Transient
6215 -- Is_Ignored_Transient
6216 -- Is_Independent
6217 -- Is_Return_Object
6218 -- Is_Safe_To_Reevaluate
6219 -- Is_Shared_Passive
6220 -- Is_True_Constant
6221 -- Is_Uplevel_Referenced_Entity
6222 -- Is_Volatile
6223 -- Is_Volatile_Full_Access
6224 -- OK_To_Rename
6225 -- Optimize_Alignment_Space
6226 -- Optimize_Alignment_Time
6227 -- SPARK_Pragma_Inherited
6228 -- Suppress_Initialization
6229 -- Treat_As_Volatile
6230 -- Address_Clause (synth)
6231 -- Alignment_Clause (synth)
6232 -- Is_Elaboration_Target (synth)
6233 -- Is_Full_Access (synth)
6234 -- Size_Clause (synth)
70482933
RK
6235
6236 -- E_Void
6237 -- Since E_Void is the initial Ekind value of an entity when it is first
6238 -- created, one might expect that no attributes would be defined on such
6239 -- an entity until its Ekind field is set. However, in practice, there
6240 -- are many instances in which fields of an E_Void entity are set in the
6241 -- code prior to setting the Ekind field. This is not well documented or
6242 -- well controlled, and needs cleaning up later. Meanwhile, the access
6243 -- procedures in the body of Einfo permit many, but not all, attributes
6244 -- to be applied to an E_Void entity, precisely so that this kind of
6245 -- pre-setting of attributes works. This is really a hole in the dynamic
6246 -- type checking, since there is no assurance that the eventual Ekind
6247 -- value will be appropriate for the attributes set, and the consequence
6248 -- is that the dynamic type checking in the Einfo body is unnecessarily
a7cadd18 6249 -- weak.
76f9c7f4 6250 --
a7cadd18
BD
6251 -- The following are examples of getters and setters called with E_Void:
6252 -- Entry_Formal $$$
6253 -- Esize $$$
6254 -- First_Entity $$$
6255 -- Handler_Records $$$
6256 -- Interface_Name $$$
6257 -- Last_Entity $$$
6258 -- Renamed_Entity $$$
6259 -- Renamed_Object $$$
6260 -- Scalar_Range $$$
6261 -- Set_Associated_Node_For_Itype $$$
6262 -- Set_Debug_Renaming_Link $$$
6263 -- Set_Entry_Cancel_Parameter $$$
6264 -- Set_First_Entity $$$
6265 -- Set_Inner_Instances $$$
6266 -- Set_Last_Entity $$$
6267 -- Set_Scalar_Range $$$
6268 -- Set_Entry_Cancel_Parameter $$$
23c799b1 6269
70482933
RK
6270 ---------------
6271 -- Iterators --
6272 ---------------
6273
6274 -- In addition to attributes that are stored as plain data, other
6275 -- attributes are procedural, and require some small amount of
6276 -- computation. Of course, from the point of view of a user of this
6277 -- package, the distinction is not visible (even the field information
4ef36ac7
AC
6278 -- provided below should be disregarded, as it is subject to change
6279 -- without notice). A number of attributes appear as lists: lists of
6280 -- formals, lists of actuals, of discriminants, etc. For these, pairs
70482933
RK
6281 -- of functions are defined, which take the form:
6282
6283 -- function First_Thing (E : Enclosing_Construct) return Thing;
6284 -- function Next_Thing (T : Thing) return Thing;
6285
6286 -- The end of iteration is always signaled by a value of Empty, so that
6287 -- loops over these chains invariably have the form:
6288
6289 -- This : Thing;
6290 -- ...
6291 -- This := First_Thing (E);
6292
6293 -- while Present (This) loop
6294 -- Do_Something_With (This);
6295 -- ...
6296 -- This := Next_Thing (This);
6297 -- end loop;
6298
6299 -----------------------------------
6300 -- Handling of Check Suppression --
6301 -----------------------------------
6302
6303 -- There are three ways that checks can be suppressed:
6304
fbf5a39b
AC
6305 -- 1. At the command line level
6306 -- 2. At the scope level.
6307 -- 3. At the entity level.
70482933 6308
fbf5a39b
AC
6309 -- See spec of Sem in sem.ads for details of the data structures used
6310 -- to keep track of these various methods for suppressing checks.
70482933
RK
6311
6312 -------------------------------
6313 -- Handling of Discriminants --
6314 -------------------------------
6315
6316 -- During semantic processing, discriminants are separate entities which
6317 -- reflect the semantic properties and allowed usage of discriminants in
6318 -- the language.
6319
6320 -- In the case of discriminants used as bounds, the references are handled
6321 -- directly, since special processing is needed in any case. However, there
6322 -- are two circumstances in which discriminants are referenced in a quite
6323 -- general manner, like any other variables:
6324
6325 -- In initialization expressions for records. Note that the expressions
21d27997
RD
6326 -- used in Priority, Storage_Size, Task_Info and Relative_Deadline
6327 -- pragmas are effectively in this category, since these pragmas are
6328 -- converted to initialized record fields in the Corresponding_Record_
6329 -- Type.
70482933
RK
6330
6331 -- In task and protected bodies, where the discriminant values may be
6332 -- referenced freely within these bodies. Discriminants can also appear
6333 -- in bounds of entry families and in defaults of operations.
6334
6335 -- In both these cases, the discriminants must be treated essentially as
6336 -- objects. The following approach is used to simplify and minimize the
6337 -- special processing that is required.
6338
21d27997
RD
6339 -- When a record type with discriminants is analyzed, semantic processing
6340 -- creates the entities for the discriminants. It also creates additional
6341 -- sets of entities called discriminals, one for each of the discriminants,
6342 -- and the Discriminal field of the discriminant entity points to this
6343 -- additional entity, which is initially created as an uninitialized
6344 -- (E_Void) entity.
70482933
RK
6345
6346 -- During expansion of expressions, any discriminant reference is replaced
6347 -- by a reference to the corresponding discriminal. When the initialization
6348 -- procedure for the record is created (there will always be one, since
6349 -- discriminants are present, see Exp_Ch3 for further details), the
6350 -- discriminals are used as the entities for the formal parameters of
6351 -- this initialization procedure. The references to these discriminants
6352 -- have already been replaced by references to these discriminals, which
6353 -- are now the formal parameters corresponding to the required objects.
6354
21d27997
RD
6355 -- In the case of a task or protected body, the semantics similarly creates
6356 -- a set of discriminals for the discriminants of the task or protected
6357 -- type. When the procedure is created for the task body, the parameter
6358 -- passed in is a reference to the task value type, which contains the
6359 -- required discriminant values. The expander creates a set of declarations
6360 -- of the form:
70482933 6361
f3d0f304 6362 -- discr_nameD : constant discr_type renames _task.discr_name;
70482933 6363
21d27997
RD
6364 -- where discr_nameD is the discriminal entity referenced by the task
6365 -- discriminant, and _task is the task value passed in as the parameter.
70482933
RK
6366 -- Again, any references to discriminants in the task body have been
6367 -- replaced by the discriminal reference, which is now an object that
6368 -- contains the required value.
6369
6370 -- This approach for tasks means that two sets of discriminals are needed
6371 -- for a task type, one for the initialization procedure, and one for the
6372 -- task body. This works out nicely, since the semantics allocates one set
6373 -- for the task itself, and one set for the corresponding record.
6374
6375 -- The one bit of trickiness arises in making sure that the right set of
6376 -- discriminals is used at the right time. First the task definition is
6377 -- processed. Any references to discriminants here are replaced by the
21d27997
RD
6378 -- corresponding *task* discriminals (the record type doesn't even exist
6379 -- yet, since it is constructed as part of the expansion of the task
6380 -- declaration, which happens after the semantic processing of the task
6381 -- definition). The discriminants to be used for the corresponding record
6382 -- are created at the same time as the other discriminals, and held in the
6383 -- CR_Discriminant field of the discriminant. A use of the discriminant in
6384 -- a bound for an entry family is replaced with the CR_Discriminant because
6385 -- it controls the bound of the entry queue array which is a component of
6386 -- the corresponding record.
70482933
RK
6387
6388 -- Just before the record initialization routine is constructed, the
6389 -- expander exchanges the task and record discriminals. This has two
6390 -- effects. First the generation of the record initialization routine
6391 -- uses the discriminals that are now on the record, which is the set
6392 -- that used to be on the task, which is what we want.
6393
6394 -- Second, a new set of (so far unused) discriminals is now on the task
6395 -- discriminants, and it is this set that will be used for expanding the
6396 -- task body, and also for the discriminal declarations at the start of
6397 -- the task body.
6398
21d27997
RD
6399 ---------------------------------------------------
6400 -- Handling of private data in protected objects --
6401 ---------------------------------------------------
6402
6403 -- Private components in protected types pose problems similar to those
6404 -- of discriminants. Private data is visible and can be directly referenced
6405 -- from protected bodies. However, when protected entries and subprograms
6406 -- are expanded into corresponding bodies and barrier functions, private
6407 -- components lose their original context and visibility.
6408
6409 -- To remedy this side effect of expansion, private components are expanded
6410 -- into renamings called "privals", by analogy with "discriminals".
6411
6412 -- private_comp : comp_type renames _object.private_comp;
6413
6414 -- Prival declarations are inserted during the analysis of subprogram and
6415 -- entry bodies to ensure proper visibility for any subsequent expansion.
6416 -- _Object is the formal parameter of the generated corresponding body or
6417 -- a local renaming which denotes the protected object obtained from entry
6418 -- parameter _O. Privals receive minimal decoration upon creation and are
6419 -- categorized as either E_Variable for the general case or E_Constant when
6420 -- they appear in functions.
6421
6422 -- Along with the local declarations, each private component carries a
6423 -- placeholder which references the prival entity in the current body. This
6424 -- form of indirection is used to resolve name clashes of privals and other
6425 -- locally visible entities such as parameters, local objects, entry family
6426 -- indexes or identifiers used in the barrier condition.
6427
6428 -- When analyzing the statements of a protected subprogram or entry, any
6429 -- reference to a private component must resolve to the locally declared
6430 -- prival through normal visibility. In case of name conflicts (the cases
6431 -- above), the prival is marked as hidden and acts as a weakly declared
6432 -- entity. As a result, the reference points to the correct entity. When a
6433 -- private component is denoted by an expanded name (prot_type.comp for
6434 -- example), the expansion mechanism uses the placeholder of the component
6435 -- to correct the Entity and Etype of the reference.
70482933 6436
70482933 6437end Einfo;
This page took 8.373811 seconds and 5 git commands to generate.