Add assember CFI directives to millicode division and remainder routines.
[official-gcc.git] / gcc / ada / einfo.ads
bloba200d6334bfd44c6b43261ba9c72023be19c4210
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- E I N F O --
6 -- --
7 -- S p e c --
8 -- --
9 -- Copyright (C) 1992-2023, Free Software Foundation, Inc. --
10 -- --
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- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
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 --
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. --
20 -- --
21 -- GNAT was originally developed by the GNAT team at New York University. --
22 -- Extensive contributions were provided by Ada Core Technologies Inc. --
23 -- --
24 ------------------------------------------------------------------------------
26 pragma Warnings (Off); -- with/use clauses for children
27 with Namet; use Namet;
28 with Snames; use Snames;
29 with Stand; use Stand;
30 with Types; use Types;
31 with Uintp; use Uintp;
32 with Urealp; use Urealp;
33 pragma Warnings (On);
35 package Einfo is
37 -- This package documents the annotations to the abstract syntax tree that are
38 -- needed to support semantic processing of an Ada compilation.
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.
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,
49 -- incomplete types, etc. These attributes are stored in fields in
50 -- tree nodes.
52 -- There are two kinds of semantic information
54 -- First, the tree nodes with the following Nkind values:
56 -- N_Defining_Identifier
57 -- N_Defining_Character_Literal
58 -- N_Defining_Operator_Symbol
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.
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
69 -- expression. These fields are defined in the Sinfo package, but their
70 -- full documentation is in the Einfo package specification.
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.
76 ----------------------------------
77 -- Handling of Type'Size Values --
78 ----------------------------------
80 -- The Ada 95 RM contains some rather peculiar (to us) rules on the value
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
83 -- default size of objects, creates chaos, and major incompatibilities in
84 -- existing code.
86 -- The Ada 2022 RM acknowledges it and adopts GNAT's Object_Size attribute
87 -- for determining the default size of objects, but stops short of applying
88 -- it universally like GNAT. Indeed the notable exceptions are nonaliased
89 -- stand-alone objects, which are not covered by Object_Size in Ada 2022.
91 -- We proceed as follows, for discrete and fixed-point subtypes, we have
92 -- two separate sizes for each subtype:
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
97 -- the basis of the determination of the size. The back end is free to
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.
102 -- The default rules for the value of Object_Size are as follows:
104 -- The Object_Size for base subtypes reflect the natural hardware
105 -- size in bits (see Ttypes and Cstand for integer types). For
106 -- enumeration and fixed-point base subtypes have 8, 16, 32, or 64
107 -- bits for this size, depending on the range of values to be stored.
109 -- The Object_Size of a subtype is the same as the Object_Size of
110 -- the subtype from which it is obtained.
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.
116 -- The Ada 2022 RM defined attribute Object_Size uses this implementation.
118 -- The Value_Size, which is the number of bits required to store a value
119 -- of the type. This size can be referred to using the Value_Size
120 -- attribute. This value is used for determining how tightly to pack
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).
126 -- The default rules for the value of Value_Size are as follows:
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).
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".)
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
140 -- to the corresponding bound of the ancestor.
142 -- The Ada 95 RM defined attribute Size is identified with Value_Size.
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
149 -- other hand, Value_Size is affected only for the first subtype, any
150 -- dynamic subtypes obtained from it directly, and any statically matching
151 -- subtypes. The Value_Size of any other static subtypes is not affected.
153 -- Value_Size and Object_Size may be explicitly set for any subtype using
154 -- an attribute definition clause. Note that the use of such a clause can
155 -- cause the RM 13.1(14) rule to be violated, in Ada 95 and 2022 for the
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.
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
163 -- Size attribute, which, as noted above, is equivalent to Value_Size).
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):
168 -- Object_Size Value_Size
170 -- type x1 is range 0..5; 8 3
172 -- type x2 is range 0..5;
173 -- for x2'size use 12; 16 12
175 -- subtype x3 is x2 range 0 .. 3; 16 2
177 -- subtype x4 is x2'base range 0 .. 10; 8 4
179 -- dynamic : x2'Base range -64 .. +63;
181 -- subtype x5 is x2 range 0 .. dynamic; 16 3*
183 -- subtype x6 is x2'base range 0 .. dynamic; 8 7*
185 -- Note: the entries marked * are not actually specified by the Ada 95 RM,
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.
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:
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
197 -- The RM_Size field keeps track of the RM Size as needed in these
198 -- three situations.
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
202 -- attribute Size). Only Size may be specified for such types.
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.
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.
211 --------------------------------------
212 -- Delayed Freezing and Elaboration --
213 --------------------------------------
215 -- The flag Has_Delayed_Freeze indicates that an entity carries an explicit
216 -- freeze node, which appears later in the expanded tree.
218 -- a) The flag is used by the front end to trigger expansion activities which
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
221 -- encountered in the current unit. See units Freeze and Exp_Ch13 for details
222 -- on the actions triggered by a freeze node, which include the construction
223 -- of initialization procedures and dispatch tables.
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.
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
231 -- place at the freeze point of the object. In Ada 2012, the flag is also set
232 -- when an address aspect for the object is encountered.
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.
239 -- Implicit base types created for type derivations, as well as class-wide
240 -- types created for all tagged types, have the flag set.
242 -- If a subprogram has an access parameter whose designated type is incomplete
243 -- the subprogram has the flag set.
245 -----------------------
246 -- Entity Attributes --
247 -----------------------
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.
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.
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.
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
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.
280 -- Other attributes are noted as applying to the [implementation base type
281 -- only]. These are representation attributes which must always apply to a
282 -- full non-private type, and where the attributes are always on the full
283 -- type. The attribute can be referenced on a subtype (and automatically
284 -- retrieves the value from the implementation base type). However, it is an
285 -- error to try to set the attribute on other than the implementation base
286 -- type.
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.
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.
297 -- Abstract_States
298 -- Defined for E_Package entities. Contains a list of all the abstract
299 -- states declared by the related package.
301 -- Accept_Address
302 -- Defined in entries. If an accept has a statement sequence, then an
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.
310 -- Access_Disp_Table [implementation base type only]
311 -- Defined in E_Record_Type and E_Record_Subtype entities. Set in tagged
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.
322 -- For an untagged record, contains No_Elist.
324 -- Access_Disp_Table_Elab_Flag [implementation base type only]
325 -- Defined in E_Record_Type and E_Record_Subtype entities. Set in tagged
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
330 -- the IP routine to avoid performing this elaboration twice.
332 -- Access_Subprogram_Wrapper
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.
341 -- Activation_Record_Component
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).
347 -- Actual_Subtype
348 -- Defined in variables, constants, and formal parameters. This is the
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.
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
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).
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.
373 -- Note: The backend references this field in E_Task_Type entities???
375 -- Address_Taken
376 -- Defined in all entities. Set if the Address or Unrestricted_Access
377 -- attribute is applied directly to the entity, i.e. the entity is the
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,
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.
386 -- Aft_Value (synthesized)
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.
392 -- Alias
393 -- Defined in overloadable entities (literals, subprograms, entries) and
394 -- subprograms that cover a primitive operation of an abstract interface
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
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.
406 -- Alignment
407 -- Defined in entities for types and also in constants, variables
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
414 -- back-end as part of the back-end back-annotation process. The
415 -- alignment field is also defined in E_Exception entities, but there it
416 -- is used only by the back-end for back annotation.
418 -- Alignment_Clause (synthesized)
419 -- Applies to all entities for types and objects. If an alignment
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.
429 -- Anonymous_Designated_Type
430 -- Defined in variables which represent anonymous finalization masters.
431 -- Contains the designated type which is being serviced by the master.
433 -- Anonymous_Masters
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.
439 -- Anonymous_Object
440 -- Present in protected and task type entities. Contains the entity of
441 -- the anonymous object created for a single protected or task type.
443 -- Associated_Entity
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.
450 -- Associated_Formal_Package
451 -- Defined in packages that are the actuals of formal_packages. Points
452 -- to the entity in the declaration for the formal package.
454 -- Associated_Node_For_Itype
455 -- Defined in all type and subtype entities. Set non-Empty only for
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
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,
461 -- type or subtype declaration.
463 -- For an access discriminant in a type declaration, the associated_
464 -- node_for_itype is the corresponding discriminant specification.
466 -- For an access parameter it is the enclosing subprogram declaration.
468 -- For an access_to_protected_subprogram parameter it is the declaration
469 -- of the corresponding formal parameter.
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.
476 -- Associated_Storage_Pool [root type only]
477 -- Defined in simple and general access type entities. References the
478 -- storage pool to be used for the corresponding collection. A value of
479 -- Empty means that the default pool is to be used. This is defined
480 -- only in the root type, since derived types must have the same pool
481 -- as the parent type.
483 -- Barrier_Function
484 -- Defined in protected entries and entry families. This is the
485 -- subprogram declaration for the body of the function that returns
486 -- the value of the entry barrier.
488 -- Base_Type (synthesized)
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.
499 -- Block_Node
500 -- Defined in block entities. Points to the identifier in the
501 -- Block_Statement itself. Used when retrieving the block construct
502 -- for finalization purposes, the block entity has an implicit label
503 -- declaration in the enclosing declarative part, and has otherwise
504 -- no direct connection in the tree with the block statement. The
505 -- link is to the identifier (which is an occurrence of the entity)
506 -- and not to the block_statement itself, because the statement may
507 -- be rewritten, e.g. in the process of removing dead code.
509 -- Body_Entity
510 -- Defined in package and generic package entities, points to the
511 -- corresponding package body entity if one is present.
513 -- Body_Needed_For_SAL
514 -- Defined in package and subprogram entities that are compilation
515 -- units. Indicates that the source for the body must be included
516 -- when the unit is part of a standalone library.
518 -- Body_Needed_For_Inlining
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.
526 -- Body_References
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.
532 -- BIP_Initialization_Call
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
538 -- for all additional transient objects found in the transient block.
540 -- C_Pass_By_Copy [implementation base type only]
541 -- Defined in record types. Set if a pragma Convention for the record
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).
550 -- Can_Never_Be_Null
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
555 -- null in Ada 2005 mode.
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.
562 -- This is also set on some access types, e.g. the Etype of the anonymous
563 -- access type of a controlling formal.
565 -- Can_Use_Internal_Rep [base type only]
566 -- Defined in Access_Subprogram_Kind nodes. This flag is set by the
567 -- front end and used by the backend. False means that the backend
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
570 -- the backend will use dynamically generated trampolines for nested
571 -- subprograms. True means that the backend can represent the type in
572 -- some internal way. On the aforementioned targets, this means that the
573 -- backend will not use dynamically generated trampolines. This flag
574 -- must be False if Has_Foreign_Convention is True; otherwise, the front
575 -- end is free to set the policy.
577 -- Setting this False in all cases corresponds to the traditional back
578 -- end strategy, where all access-to-subprogram types are represented the
579 -- same way, independent of the Convention. For further details, see also
580 -- Always_Compatible_Rep in Targparm.
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
587 -- particular, pragma Favor_Top_Level gives a hint that the flag
588 -- should be False.
590 -- Note: We considered using Convention-C for this purpose, but we need
591 -- this separate flag, because Convention-C implies that in the case of
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.
596 -- Chars
597 -- Defined in all entities. This field contains an entry into the names
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
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.
607 -- Checks_May_Be_Suppressed
608 -- Defined in all entities. Set if a pragma Suppress or Unsuppress
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.
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.
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.
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.
632 -- Class_Wide_Type
633 -- Defined in all type entities. For a tagged type or subtype, returns
634 -- the corresponding implicitly declared class-wide type. For a
635 -- class-wide type, returns itself. Set to Empty for untagged types.
637 -- Cloned_Subtype
638 -- Defined in E_Record_Subtype and E_Class_Wide_Subtype entities.
639 -- Each such entity can either have a Discriminant_Constraint, in
640 -- which case it represents a distinct type from the base type (and
641 -- will have a list of components and discriminants in the list headed by
642 -- First_Entity) or else no such constraint, in which case it will be a
643 -- copy of the base type.
645 -- o Each element of the list in First_Entity is copied from the base
646 -- type; in that case, this field is Empty.
648 -- o The list in First_Entity is shared with the base type; in that
649 -- case, this field points to that entity.
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.
655 -- For E_Class_Wide_Subtype, the presence of Equivalent_Type overrides
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
658 -- Cloned_Subtype in an E_Record_Type or E_Class_Wide_Type entity.
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.
666 -- Component_Alignment (special field) [base type only]
667 -- Defined in array and record entities. Contains a value of type
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.
673 -- Component_Bit_Offset
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,
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
684 -- lengths). See package Repinfo for details of these values.
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
689 -- use in the backend, to have this redundant field.
691 -- Component_Clause
692 -- Defined in record components and discriminants. If a record
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.
699 -- Component_Size [implementation base type only]
700 -- Defined in array types. It contains the component size value for
701 -- the array. A value of No_Uint means that the value is not yet set.
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
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;".
710 -- Component_Type [implementation base type only]
711 -- Defined in array types and string types. References component type.
713 -- Contains_Ignored_Ghost_Code
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.
718 -- Contract
719 -- Defined in constant, entry, entry family, operator, [generic] package,
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.
724 -- Contract_Wrapper
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.
730 -- Corresponding_Concurrent_Type
731 -- Defined in record types that are constructed by the expander to
732 -- represent task and protected types (Is_Concurrent_Record_Type flag
733 -- set). Points to the entity for the corresponding task type or the
734 -- protected type.
736 -- Corresponding_Discriminant
737 -- Defined in discriminants of a derived type, when the discriminant is
738 -- used to constrain a discriminant of the parent type. Points to the
739 -- corresponding discriminant in the parent type. Otherwise it is Empty.
741 -- Corresponding_Equality
742 -- Defined in function entities for implicit inequality operators.
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.
748 -- Corresponding_Function
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.
754 -- Corresponding_Procedure
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.
759 -- Corresponding_Record_Component
760 -- Defined in components of a derived untagged record type, including
761 -- discriminants. For a regular component or a stored discriminant,
762 -- points to the corresponding component in the parent type. Set to
763 -- Empty for a non-stored discriminant. It is used by the back end to
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.
767 -- Corresponding_Record_Type
768 -- Defined in protected and task types and subtypes. References the
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.
772 -- Corresponding_Remote_Type
773 -- Defined in record types that describe the fat pointer structure for
774 -- Remote_Access_To_Subprogram types. References the original access
775 -- to subprogram type.
777 -- CR_Discriminant
778 -- Defined in discriminants of concurrent types. Denotes the homologous
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.
783 -- Current_Use_Clause
784 -- Defined in packages and in types. For packages, denotes the use
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.
790 -- Current_Value
791 -- Defined in all object entities. Set in E_Variable, E_Constant, formal
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
794 -- is known. This value is valid only for references from the same
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.
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.
811 -- Debug_Info_Off
812 -- Defined in all entities. Set if a pragma Suppress_Debug_Info applies
813 -- to the entity, or if internal processing in the compiler determines
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
816 -- determining if Needs_Debug_Info should be set. The backend should
817 -- always test Needs_Debug_Info, it should never test Debug_Info_Off.
819 -- Debug_Renaming_Link
820 -- Used to link the variable associated with a debug renaming declaration
821 -- to the renamed entity. See Exp_Dbug.Debug_Renaming_Declaration for
822 -- details of the use of this field.
824 -- Declaration_Node (synthesized)
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
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
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.
837 -- Default_Aspect_Component_Value [base type only]
838 -- Defined in array types. Holds the static value specified in a
839 -- Default_Component_Value aspect specification for the array type,
840 -- or inherited on derivation.
842 -- Default_Aspect_Value [base type only]
843 -- Defined in scalar types. Holds the static value specified in a
844 -- Default_Value aspect specification for the type, or inherited
845 -- on derivation.
847 -- Default_Expr_Function
848 -- Defined in parameters. It holds the entity of the parameterless
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.
853 -- Default_Expressions_Processed
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.
860 -- Default_Value
861 -- Defined in formal parameters. Points to the node representing the
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).
866 -- Delay_Cleanups
867 -- Defined in entities that have finalization lists (subprograms
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).
874 -- Delay_Subprogram_Descriptors
875 -- Defined in entities for which exception subprogram descriptors
876 -- are generated (subprograms, package declarations and package
877 -- bodies). Defined if there are pending generic body instantiations
878 -- for the corresponding entity. If this flag is set, then generation
879 -- of the subprogram descriptor for the corresponding entities must
880 -- be delayed, since the insertion of the generic body may add entries
881 -- to the list of handlers.
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).
891 -- Delta_Value
892 -- Defined in fixed and decimal types. Points to a universal real
893 -- that holds value of delta for the type, as given in the declaration
894 -- or as inherited by a subtype or derived type.
896 -- Dependent_Instances
897 -- Defined in packages that are instances. Holds list of instances
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.
902 -- Depends_On_Private
903 -- Defined in all type entities. Set if the type is private or if it
904 -- depends on a private type.
906 -- Derived_Type_Link
907 -- Defined in all type and subtype entities. Set in a base type if
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:
914 -- type R is ...
915 -- subtype RS is R ...
916 -- ...
917 -- type G is new RS ...
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
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.
925 -- Note: if there is more than one such derived type, the link will point
926 -- to the last one.
928 -- Designated_Type (synthesized)
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.
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
939 -- and verifies the assertion expression of the DIC pragma at run time.
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.
944 -- Digits_Value
945 -- Defined in floating point types and subtypes and decimal types and
946 -- subtypes. Contains the Digits value specified in the declaration.
948 -- Direct_Primitive_Operations
949 -- Defined in tagged types and subtypes (including synchronized types),
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.
962 -- Directly_Designated_Type
963 -- Defined in access types. This field points to the type that is
964 -- directly designated by the access type. In the case of an access
965 -- type to an incomplete type, this field references the incomplete
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.
972 -- Disable_Controlled [base type only]
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.
977 -- Discard_Names
978 -- Defined in types and exception entities. Set if pragma Discard_Names
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
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.
986 -- Discriminal
987 -- Defined in discriminants (Discriminant formal: GNAT's first
988 -- coinage). The entity used as a formal parameter that corresponds
989 -- to a discriminant. See section "Handling of Discriminants" for
990 -- full details of the use of discriminals.
992 -- Discriminal_Link
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.
997 -- Discriminant_Checking_Func
998 -- Defined in components. Points to the defining identifier of the
999 -- function built by the expander returns a Boolean indicating whether
1000 -- the given record component exists for the current discriminant
1001 -- values.
1003 -- Discriminant_Constraint
1004 -- Defined in entities whose Has_Discriminants flag is set (concurrent
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
1008 -- Has_Discriminants is False.
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.
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.
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).
1027 -- In all other cases Discriminant_Constraint contains the empty
1028 -- Elist (i.e. it is initialized with a call to New_Elmt_List).
1030 -- Discriminant_Default_Value
1031 -- Defined in discriminants. Points to the node representing the
1032 -- expression for the default value of the discriminant. Set to
1033 -- Empty if the discriminant has no default value.
1035 -- Discriminant_Number
1036 -- Defined in discriminants. Gives the ranking of a discriminant in
1037 -- the list of discriminants of the type, i.e. a sequential integer
1038 -- index starting at 1 and ranging up to number of discriminants.
1040 -- Dispatch_Table_Wrappers [implementation base type only]
1041 -- Defined in E_Record_Type and E_Record_Subtype entities. Set in library
1042 -- level tagged type entities if we are generating statically allocated
1043 -- dispatch tables. Points to the list of dispatch table wrappers
1044 -- associated with the tagged type. For an untagged record, contains
1045 -- No_Elist.
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.
1052 -- DTC_Entity
1053 -- Defined in function and procedure entities. Set to Empty unless
1054 -- the subprogram is dispatching in which case it references the
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.
1061 -- DT_Entry_Count
1062 -- Defined in E_Component entities. Only used for component marked
1063 -- Is_Tag. Store the number of entries in the Vtable (or Dispatch Table)
1065 -- DT_Offset_To_Top_Func
1066 -- Defined in E_Component entities. Only used for component marked
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.
1070 -- DT_Position
1071 -- Defined in function and procedure entities which are dispatching
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.
1076 -- Ekind (Ekind)
1077 -- Defined in all entities. Contains a value of the enumeration type
1078 -- Entity_Kind declared in a subsequent section in this spec.
1080 -- Elaborate_Body_Desirable
1081 -- Defined in package entities. Set if the elaboration circuitry detects
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.
1088 -- Elaboration_Entity
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
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.
1100 -- Note that we always allocate this counter, and set this field, but
1101 -- we do not always actually use it. It is only used if it is needed
1102 -- for access before elaboration use (see Elaboration_Entity_Required
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.
1108 -- Elaboration_Entity_Required
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
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.
1118 -- Encapsulating_State
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.
1123 -- Enclosing_Scope
1124 -- Defined in labels. Denotes the innermost enclosing construct that
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.
1130 -- Entry_Accepted
1131 -- Defined in E_Entry and E_Entry_Family entities. Set if there is
1132 -- at least one accept for this entry in the task body. Used to
1133 -- generate warnings for missing accepts.
1135 -- Entry_Bodies_Array
1136 -- Defined in protected types for which Has_Entries is true.
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.
1141 -- Entry_Cancel_Parameter
1142 -- Defined in blocks. This only applies to a block statement for
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.
1152 -- Entry_Component
1153 -- Defined in formal parameters (in, in out and out parameters). Used
1154 -- only for formals of entries. References the corresponding component
1155 -- of the entry parameter record for the entry.
1157 -- Entry_Formal
1158 -- Defined in components of the record built to correspond to entry
1159 -- parameters. This field points from the component to the formal. It
1160 -- is the back pointer corresponding to Entry_Component.
1162 -- Entry_Index_Constant
1163 -- Defined in an entry index parameter. This is an identifier that
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.
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.
1174 -- Entry_Max_Queue_Lengths_Array
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.
1179 -- Entry_Parameters_Type
1180 -- Defined in entries. Points to the access-to-record type that is
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.
1188 -- Enumeration_Pos
1189 -- Defined in enumeration literals. Contains the position number
1190 -- corresponding to the value of the enumeration literal.
1192 -- Enumeration_Rep
1193 -- Defined in enumeration literals. Contains the representation that
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.
1200 -- Enumeration_Rep_Expr
1201 -- Defined in enumeration literals. Points to the expression in an
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.
1208 -- Enum_Pos_To_Rep
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.
1220 -- Equivalent_Type
1221 -- Defined in class wide types and subtypes, access to protected
1222 -- subprogram types, and in exception types. For a classwide type, it
1223 -- is always Empty. For a class wide subtype, it points to an entity
1224 -- created by the expander which gives the backend an understandable
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
1227 -- details. For E_Exception_Type, this points to the record containing
1228 -- the data necessary to represent exceptions (for further details, see
1229 -- System.Standard_Library). For access to protected subprograms, it
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.
1234 -- Esize
1235 -- Defined in all types and subtypes, and also for components, constants,
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.
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
1244 -- of a component to be set without a component clause defined, which
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".
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.
1250 -- Etype
1251 -- Defined in all entities. Represents the type of the entity, which
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
1254 -- itself. For a subtype entity, Etype points to the base type. For
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
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.
1260 -- Note one obscure case: for pragma Default_Storage_Pool (null), the
1261 -- Etype of the N_Null node is Empty.
1263 -- Extra_Accessibility
1264 -- Defined in formal parameters in the non-generic case. Normally Empty,
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
1267 -- Natural is created (see description of field Extra_Formal), and the
1268 -- Extra_Accessibility field of the formal parameter points to the entity
1269 -- for this extra formal. Also defined in variables when compiling
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.
1275 -- Extra_Accessibility_Of_Result
1276 -- Defined in (non-generic) Function, Operator, and Subprogram_Type
1277 -- entities. Normally Empty, but if expansion is active, and a function
1278 -- is one for which "the accessibility level of the result ... determined
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.
1284 -- Extra_Constrained
1285 -- Defined in formal parameters in the non-generic case. Normally Empty,
1286 -- but if expansion is active and a parameter is one for which a dynamic
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
1290 -- entity for this extra formal. Also defined in variables when compiling
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.
1296 -- Extra_Formal
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
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.
1311 -- Extra_Formals
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.
1316 -- Finalization_Master [root type only]
1317 -- Defined in access-to-controlled or access-to-class-wide types. The
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.
1323 -- Finalize_Storage_Only [base type only]
1324 -- Defined in all types. Set on direct controlled types to which a
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.
1332 -- Finalizer
1333 -- Applies to package declarations and bodies. Contains the entity of the
1334 -- library-level program which finalizes all package-level controlled
1335 -- objects.
1337 -- First_Component (synthesized)
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.
1344 -- First_Component_Or_Discriminant (synthesized)
1345 -- Similar to First_Component, but discriminants are not skipped, so will
1346 -- find the first discriminant if discriminants are present.
1348 -- First_Entity
1349 -- Defined in all entities which act as scopes to which a list of
1350 -- associated entities is attached (blocks, class subtypes and types,
1351 -- entries, functions, loops, packages, procedures, protected objects,
1352 -- record types and subtypes, private types, task types and subtypes).
1353 -- Points to a list of associated entities using the Next_Entity field
1354 -- as a chain pointer with Empty marking the end of the list.
1356 -- First_Exit_Statement
1357 -- Defined in E_Loop entity. The exit statements for a loop are chained
1358 -- (in reverse order of appearance) using this field to point to the
1359 -- first entry in the chain (last exit statement in the loop). The
1360 -- entries are chained through the Next_Exit_Statement field of the
1361 -- N_Exit_Statement node with Empty marking the end of the list.
1363 -- First_Formal (synthesized)
1364 -- Applies to subprograms and subprogram types, and also to entries
1365 -- and entry families. Returns first formal of the subprogram or entry.
1366 -- The formals are the first entities declared in a subprogram or in
1367 -- a subprogram type (the designated type of an Access_To_Subprogram
1368 -- definition) or in an entry.
1370 -- First_Formal_With_Extras (synthesized)
1371 -- Applies to subprograms and subprogram types, and also in entries
1372 -- and entry families. Returns first formal of the subprogram or entry.
1373 -- Returns Empty if there are no formals. The list returned includes
1374 -- all the extra formals (see description of Extra_Formals field).
1376 -- First_Index
1377 -- Defined in array types and subtypes. By introducing implicit subtypes
1378 -- for the index constraints, we have the same structure for constrained
1379 -- and unconstrained arrays, subtype marks and discrete ranges are
1380 -- both represented by a subtype. This function returns the tree node
1381 -- corresponding to an occurrence of the first index (NOT the entity for
1382 -- the type). Subsequent indices are obtained using Next_Index. Note that
1383 -- this field is defined for the case of string literal subtypes, but is
1384 -- always Empty.
1386 -- First_Literal
1387 -- Defined in all enumeration types, including character and boolean
1388 -- types. This field points to the first enumeration literal entity
1389 -- for the type (i.e. it is set to First (Literals (N)) where N is
1390 -- the enumeration type definition node. A special case occurs with
1391 -- standard character and wide character types, where this field is
1392 -- Empty, since there are no enumeration literal lists in these cases.
1393 -- Note that this field is set in enumeration subtypes, but it still
1394 -- points to the first literal of the base type in this case.
1396 -- First_Private_Entity
1397 -- Defined in all entities containing private parts (packages, protected
1398 -- types and subtypes, task types and subtypes). The entities on the
1399 -- entity chain are in order of declaration, so the entries for private
1400 -- entities are at the end of the chain. This field points to the first
1401 -- entity for the private part. It is Empty if there are no entities
1402 -- declared in the private part or if there is no private part.
1404 -- First_Rep_Item
1405 -- Defined in all entities. If non-empty, points to a linked list of
1406 -- representation pragmas nodes and representation clause nodes that
1407 -- apply to the entity, linked using Next_Rep_Item, with Empty marking
1408 -- the end of the list. In the case of derived types and subtypes, the
1409 -- new entity inherits the chain at the point of declaration. This means
1410 -- that it is possible to have multiple instances of the same kind of rep
1411 -- item on the chain, in which case it is the first one that applies to
1412 -- the entity.
1414 -- Note: pragmas that can apply to more than one overloadable entity,
1415 -- (Convention, Interface, Inline, Inline_Always, Import, Export,
1416 -- External) are never present on this chain when they apply to
1417 -- overloadable entities, since it is impossible for a given pragma
1418 -- to be on more than one chain at a time.
1420 -- For most representation items, the representation information is
1421 -- reflected in other fields and flags in the entity. For example if a
1422 -- record representation clause is present, the component entities
1423 -- reflect the specified information. However, there are some items that
1424 -- are only reflected in the chain. These include:
1426 -- Machine_Attribute pragma
1427 -- Link_Alias pragma
1428 -- Linker_Constructor pragma
1429 -- Linker_Destructor pragma
1430 -- Weak_External pragma
1431 -- Thread_Local_Storage pragma
1433 -- If any of these items are present, then the flag Has_Gigi_Rep_Item is
1434 -- set, indicating that the backend should search the chain.
1436 -- Other representation items are included in the chain so that error
1437 -- messages can easily locate the relevant nodes for posting errors.
1438 -- Note in particular that size clauses are defined only for this
1439 -- purpose, and should only be accessed if Has_Size_Clause is set.
1441 -- Float_Rep [base type only]
1442 -- Defined in floating-point entities. Contains a value of type
1443 -- Float_Rep_Kind. Together with the Digits_Value uniquely defines
1444 -- the floating-point representation to be used.
1446 -- Freeze_Node
1447 -- Defined in all entities. If there is an associated freeze node for the
1448 -- entity, this field references this freeze node. If no freeze node is
1449 -- associated with the entity, then this field is Empty. See package
1450 -- Freeze for further details.
1452 -- From_Limited_With
1453 -- Defined in abtract states, package and type entities. Set to True when
1454 -- the related entity is generated by the expansion of a limited with
1455 -- clause. Such an entity is said to be a "shadow" - it acts as the
1456 -- abstract view of a state or variable or as the incomplete view of a
1457 -- type by inheriting relevant attributes from the said entity.
1459 -- Full_View
1460 -- Defined in all type and subtype entities and in deferred constants.
1461 -- References the entity for the corresponding full type or constant
1462 -- declaration. For all types other than private and incomplete types,
1463 -- this field always contains Empty. If an incomplete type E1 is
1464 -- completed by a private type E2 whose full type declaration entity is
1465 -- E3 then the full view of E1 is E2, and the full view of E2 is E3. See
1466 -- also Underlying_Type.
1468 -- Generic_Homonym
1469 -- Defined in generic packages. The generic homonym is the entity of
1470 -- a renaming declaration inserted in every generic unit. It is used
1471 -- to resolve the name of a local entity that is given by a qualified
1472 -- name, when the generic entity itself is hidden by a local name.
1474 -- Generic_Renamings
1475 -- Defined in package and subprogram instances. Holds mapping that
1476 -- associates generic parameters with the corresponding instances, in
1477 -- those cases where the instance is an entity.
1479 -- Handler_Records
1480 -- Defined in subprogram and package entities. Points to a list of
1481 -- identifiers referencing the handler record entities for the
1482 -- corresponding unit.
1484 -- Has_Aliased_Components [implementation base type only]
1485 -- Defined in array type entities. Indicates that the component type
1486 -- of the array is aliased. Should this also be set for records to
1487 -- indicate that at least one component is aliased (see processing in
1488 -- Sem_Prag.Process_Atomic_Independent_Shared_Volatile???)
1490 -- Has_Alignment_Clause
1491 -- Defined in all type entities and objects. Indicates if an alignment
1492 -- clause has been given for the entity. If set, then Alignment_Clause
1493 -- returns the N_Attribute_Definition node for the alignment attribute
1494 -- definition clause. Note that it is possible for this flag to be False
1495 -- even when Alignment_Clause returns non_Empty (this happens in the case
1496 -- of derived type declarations).
1498 -- Has_All_Calls_Remote
1499 -- Defined in all library unit entities. Set if the library unit has an
1500 -- All_Calls_Remote pragma. Note that such entities must also be RCI
1501 -- entities, so the flag Is_Remote_Call_Interface will always be set if
1502 -- this flag is set.
1504 -- Has_Atomic_Components [implementation base type only]
1505 -- Defined in all types and objects. Set only for an array type or
1506 -- an array object if a valid pragma Atomic_Components applies to the
1507 -- type or object. Note that in the case of an object, this flag is
1508 -- only set on the object if there was an explicit pragma for the
1509 -- object. In other words, the proper test for whether an object has
1510 -- atomic components is to see if either the object or its base type
1511 -- has this flag set. Note that in the case of a type, the pragma will
1512 -- be chained to the rep item chain of the first subtype in the usual
1513 -- manner.
1515 -- Has_Attach_Handler (synthesized)
1516 -- Applies to record types that are constructed by the expander to
1517 -- represent protected types. Returns True if there is at least one
1518 -- Attach_Handler pragma in the corresponding specification.
1520 -- Has_Biased_Representation
1521 -- Defined in discrete types (where it applies to the type'size value),
1522 -- and to objects (both stand-alone and components), where it applies to
1523 -- the size of the object from a size or record component clause. In
1524 -- all cases it indicates that the size in question is smaller than
1525 -- would normally be required, but that the size requirement can be
1526 -- satisfied by using a biased representation, in which stored values
1527 -- have the low bound (Expr_Value (Type_Low_Bound (T)) subtracted to
1528 -- reduce the required size. For example, a type with a range of 1..2
1529 -- takes one bit, using 0 to represent 1 and 1 to represent 2.
1531 -- Note that in the object and component cases, the flag is only set if
1532 -- the type is unbiased, but the object specifies a smaller size than the
1533 -- size of the type, forcing biased representation for the object, but
1534 -- the subtype is still an unbiased type.
1536 -- Has_Completion
1537 -- Defined in all entities that require a completion (functions,
1538 -- procedures, private types, limited private types, incomplete types,
1539 -- constants and packages that require a body). The flag is set if the
1540 -- completion has been encountered and analyzed.
1542 -- Has_Completion_In_Body
1543 -- Defined in all entities for types and subtypes. Set only in "Taft
1544 -- amendment types" (incomplete types whose full declaration appears in
1545 -- the package body).
1547 -- Has_Complex_Representation [implementation base type only]
1548 -- Defined in record types. Set only for a base type to which a valid
1549 -- pragma Complex_Representation applies.
1551 -- Has_Component_Size_Clause [implementation base type only]
1552 -- Defined in all type entities. Set if a component size clause is
1553 -- Defined for the given type. Note that this flag can be False even
1554 -- if Component_Size is non-zero (happens in the case of derived types).
1556 -- Has_Constrained_Partial_View [base type only]
1557 -- Defined in private type and their completions, when the private
1558 -- type has no discriminants and the full view has discriminants with
1559 -- defaults. In Ada 2005 heap-allocated objects of such types are not
1560 -- constrained, and can change their discriminants with full assignment.
1562 -- Ada 2012 has an additional rule (3.3. (23/10.3)) concerning objects
1563 -- declared in a generic package body. Objects whose type is an untagged
1564 -- generic formal private type are considered to have a constrained
1565 -- partial view. The predicate Object_Type_Has_Constrained_Partial_View
1566 -- in sem_aux is used to test for this case.
1568 -- Has_Contiguous_Rep
1569 -- Defined in enumeration types. Set if the type has a representation
1570 -- clause whose entries are successive integers.
1572 -- Has_Controlled_Component [base type only]
1573 -- Defined in all type and subtype entities. Set only for composite type
1574 -- entities which contain a component that either is a controlled type,
1575 -- or itself contains controlled component (i.e. either Is_Controlled or
1576 -- Has_Controlled_Component is set for at least one component).
1578 -- Has_Controlling_Result
1579 -- Defined in E_Function entities. Set if the function is a primitive
1580 -- function of a tagged type which can dispatch on result. Also set on
1581 -- secondary stack thunks built for such a primitive function.
1583 -- Has_Convention_Pragma
1584 -- Defined in all entities. Set for an entity for which a valid pragma
1585 -- Convention, Import, or Export has been given. Used to prevent more
1586 -- than one such pragma appearing for a given entity (RM B.1(45)).
1588 -- Has_Default_Aspect [base type only]
1589 -- Defined in entities for types and subtypes, set for scalar types with
1590 -- a Default_Value aspect and array types with a Default_Component_Value
1591 -- aspect. If this flag is set, then a corresponding aspect specification
1592 -- node will be present on the rep item chain for the entity. For a
1593 -- derived type that inherits a default from its ancestor, the default
1594 -- value is set, but it may be overridden by an aspect declaration on
1595 -- type derivation.
1597 -- Has_Delayed_Aspects
1598 -- Defined in all entities. Set if the Rep_Item chain for the entity has
1599 -- one or more N_Aspect_Definition nodes chained which are not to be
1600 -- evaluated till the freeze point. The aspect definition expression
1601 -- clause has been preanalyzed to get visibility at the point of use,
1602 -- but no other action has been taken.
1604 -- Has_Delayed_Freeze
1605 -- Defined in all entities. Set to indicate that an explicit freeze
1606 -- node must be generated for the entity at its freezing point. See
1607 -- separate section ("Delayed Freezing and Elaboration") for details.
1609 -- Has_Delayed_Rep_Aspects
1610 -- Defined in all types and subtypes. This flag is set if there is at
1611 -- least one aspect for a representation characteristic that has to be
1612 -- delayed and is one of the characteristics that may be inherited by
1613 -- types derived from this type if not overridden. If this flag is set,
1614 -- then types derived from this type have May_Inherit_Delayed_Rep_Aspects
1615 -- set, signalling that Freeze.Inherit_Delayed_Rep_Aspects must be called
1616 -- at the freeze point of the derived type.
1618 -- Has_DIC (synthesized)
1619 -- Defined in all type entities. Set for a private type and its full view
1620 -- when the type is subject to pragma Default_Initial_Condition (DIC), or
1621 -- when the type inherits a DIC pragma from a parent type.
1623 -- Has_Discriminants
1624 -- Defined in all types and subtypes. For types that are allowed to have
1625 -- discriminants (record types and subtypes, task types and subtypes,
1626 -- protected types and subtypes, private types, limited private types,
1627 -- and incomplete types), indicates if the corresponding type or subtype
1628 -- has a known discriminant part. Always false for all other types.
1630 -- Has_Dispatch_Table
1631 -- Defined in E_Record_Types that are tagged. Set to indicate that the
1632 -- corresponding dispatch table is already built. This flag is used to
1633 -- avoid duplicate construction of library level dispatch tables (because
1634 -- the declaration of library level objects cause premature construction
1635 -- of the table); otherwise the code that builds the table is added at
1636 -- the end of the list of declarations of the package.
1638 -- Has_Dynamic_Predicate_Aspect
1639 -- Defined in all types and subtypes. Set if a Dynamic_Predicate aspect
1640 -- was explicitly applied to the type. Generally we treat predicates as
1641 -- static if possible, regardless of whether they are specified using
1642 -- Predicate, Static_Predicate, or Dynamic_Predicate. And if a predicate
1643 -- can be treated as static (i.e. its expression is predicate-static),
1644 -- then the flag Has_Static_Predicate will be set True. But there are
1645 -- cases where legality is affected by the presence of an explicit
1646 -- Dynamic_Predicate aspect. For example, even if a predicate looks
1647 -- static, you can't use it in a case statement if there is an explicit
1648 -- Dynamic_Predicate aspect specified. So test Has_Static_Predicate if
1649 -- you just want to know if the predicate can be evaluated statically,
1650 -- but test Has_Dynamic_Predicate_Aspect to enforce legality rules about
1651 -- the use of dynamic predicates.
1653 -- Has_Entries (synthesized)
1654 -- Applies to concurrent types. True if any entries are declared
1655 -- within the task or protected definition for the type.
1657 -- Has_Enumeration_Rep_Clause
1658 -- Defined in enumeration types. Set if an enumeration representation
1659 -- clause has been given for this enumeration type. Used to prevent more
1660 -- than one enumeration representation clause for a given type. Note
1661 -- that this does not imply a representation with holes, since the rep
1662 -- clause may merely confirm the default 0..N representation.
1664 -- Has_Exit
1665 -- Defined in loop entities. Set if the loop contains an exit statement.
1667 -- Has_Expanded_Contract
1668 -- Defined in functions, procedures, entries, and entry families. Set
1669 -- when a subprogram has a N_Contract node that has been expanded. The
1670 -- flag prevents double expansion of a contract when a construct is
1671 -- rewritten into something else and subsequently reanalyzed/expanded.
1673 -- Has_Foreign_Convention (synthesized)
1674 -- Applies to all entities. Determines if the Convention for the entity
1675 -- is a foreign convention, i.e. non-native: other than Convention_Ada,
1676 -- Convention_Intrinsic, Convention_Entry, Convention_Protected,
1677 -- Convention_Stubbed and Convention_Ada_Pass_By_(Copy,Reference).
1679 -- Has_Forward_Instantiation
1680 -- Defined in package entities. Set for packages that instantiate local
1681 -- generic entities before the corresponding generic body has been seen.
1682 -- If a package has a forward instantiation, we cannot inline subprograms
1683 -- appearing in the same package because the placement requirements of
1684 -- the instance will conflict with the linear elaboration of front-end
1685 -- inlining.
1687 -- Has_Fully_Qualified_Name
1688 -- Defined in all entities. Set if the name in the Chars field has been
1689 -- replaced by the fully qualified name, as used for debug output. See
1690 -- Exp_Dbug for a full description of the use of this flag and also the
1691 -- related flag Has_Qualified_Name.
1693 -- Has_Gigi_Rep_Item
1694 -- Defined in all entities. Set if the rep item chain (referenced by
1695 -- First_Rep_Item and linked through the Next_Rep_Item chain) contains a
1696 -- representation item that needs to be specially processed by the back
1697 -- end, i.e. one of the following items:
1699 -- Machine_Attribute pragma
1700 -- Linker_Alias pragma
1701 -- Linker_Constructor pragma
1702 -- Linker_Destructor pragma
1703 -- Weak_External pragma
1704 -- Thread_Local_Storage pragma
1706 -- If this flag is set, then the backend should scan the rep item chain
1707 -- to process any of these items that appear. At least one such item will
1708 -- be present.
1710 -- Has_Homonym
1711 -- Defined in all entities. Set if an entity has a homonym in the same
1712 -- scope. Used by the backend to generate unique names for all entities.
1714 -- Has_Implicit_Dereference
1715 -- Defined in types and discriminants. Set if the type has an aspect
1716 -- Implicit_Dereference. Set also on the discriminant named in the aspect
1717 -- clause, to simplify type resolution.
1719 -- Has_Independent_Components [implementation base type only]
1720 -- Defined in all types and objects. Set only for a record type or an
1721 -- array type or array object if a valid pragma Independent_Components
1722 -- applies to the type or object. Note that in the case of an object,
1723 -- this flag is only set on the object if there was an explicit pragma
1724 -- for the object. In other words, the proper test for whether an object
1725 -- has independent components is to see if either the object or its base
1726 -- type has this flag set. Note that in the case of a type, the pragma
1727 -- will be chained to the rep item chain of the first subtype in the
1728 -- usual manner. Also set if a pragma Has_Atomic_Components or pragma
1729 -- Has_Aliased_Components applies to the type or object.
1731 -- Has_Inheritable_Invariants [base type only]
1732 -- Defined in all type entities. Set on private types and interface types
1733 -- which define at least one class-wide invariant. Such invariants must
1734 -- be inherited by derived types. The flag is also set on the full view
1735 -- of a private type for completeness.
1737 -- Has_Inherited_DIC [base type only]
1738 -- Defined in all type entities. Set for a derived type which inherits
1739 -- pragma Default_Initial_Condition from a parent type.
1741 -- Has_Inherited_Invariants [base type only]
1742 -- Defined in all type entities. Set on private extensions and derived
1743 -- types which inherit at least one class-wide invariant from a parent or
1744 -- an interface type. The flag is also set on the full view of a private
1745 -- extension for completeness.
1747 -- Has_Initial_Value
1748 -- Defined in entities for variables and out parameters. Set if there
1749 -- is an explicit initial value expression in the declaration of the
1750 -- variable. Note that this is set only if this initial value is
1751 -- explicit, it is not set for the case of implicit initialization
1752 -- of access types or controlled types. Always set to False for out
1753 -- parameters. Also defined in entities for in and in-out parameters,
1754 -- but always false in these cases.
1756 -- Has_Interrupt_Handler (synthesized)
1757 -- Applies to all protected type entities. Set if the protected type
1758 -- definition contains at least one procedure to which a pragma
1759 -- Interrupt_Handler applies.
1761 -- Has_Invariants (synthesized)
1762 -- Defined in all type entities. True if the type defines at least one
1763 -- invariant of its own or inherits at least one class-wide invariant
1764 -- from a parent type or an interface.
1766 -- Has_Limited_View (synth)
1767 -- Defined in all entities. True for non-generic package entities that
1768 -- are non-instances and their Limited_View attribute is present.
1770 -- Has_Loop_Entry_Attributes
1771 -- Defined in E_Loop entities. Set when the loop is subject to at least
1772 -- one attribute 'Loop_Entry. The flag also implies that the loop has
1773 -- already been transformed. See Expand_Loop_Entry_Attribute for details.
1775 -- Has_Machine_Radix_Clause
1776 -- Defined in decimal types and subtypes, set if a Machine_Radix
1777 -- representation clause is present. This flag is used to detect
1778 -- the error of multiple machine radix clauses for a single type.
1780 -- Has_Master_Entity
1781 -- Defined in entities that can appear in the scope stack (see spec
1782 -- of Sem). It is set if a task master entity (_master) has been
1783 -- declared and initialized in the corresponding scope.
1785 -- Has_Missing_Return
1786 -- Defined in functions and generic functions. Set if there is one or
1787 -- more missing return statements in the function. This is used to
1788 -- control wrapping of the body in Exp_Ch6 to ensure that the program
1789 -- error exception is correctly raised in this case at run time.
1791 -- Has_Nested_Block_With_Handler
1792 -- Defined in scope entities. Set if there is a nested block within the
1793 -- scope that has an exception handler and the two scopes are in the
1794 -- same procedure. This is used by the backend for controlling certain
1795 -- optimizations to ensure that they are consistent with exceptions.
1796 -- See documentation in backend for further details.
1798 -- Has_Nested_Subprogram
1799 -- Defined in subprogram entities. Set for a subprogram which contains at
1800 -- least one nested subprogram.
1802 -- Has_Non_Limited_View (synth)
1803 -- Defined in E_Incomplete_Type, E_Incomplete_Subtype, E_Class_Wide_Type,
1804 -- E_Abstract_State entities. True if their Non_Limited_View attribute
1805 -- is present.
1807 -- Has_Non_Null_Abstract_State (synth)
1808 -- Defined in package entities. True if the package is subject to a non-
1809 -- null Abstract_State aspect/pragma.
1811 -- Has_Non_Null_Visible_Refinement (synth)
1812 -- Defined in E_Abstract_State entities. True if the state has a visible
1813 -- refinement of at least one variable or state constituent as expressed
1814 -- in aspect/pragma Refined_State.
1816 -- Has_Non_Standard_Rep [implementation base type only]
1817 -- Defined in all type entities. Set when some representation clause
1818 -- or pragma causes the representation of the item to be significantly
1819 -- modified. In this category are changes of small or radix for a
1820 -- fixed-point type, change of component size for an array, and record
1821 -- or enumeration representation clauses, as well as packed pragmas.
1822 -- All other representation clauses (e.g. Size and Alignment clauses)
1823 -- are not considered to be significant since they do not affect
1824 -- stored bit patterns.
1826 -- Has_Null_Abstract_State (synth)
1827 -- Defined in package entities. True if the package is subject to a null
1828 -- Abstract_State aspect/pragma.
1830 -- Has_Null_Visible_Refinement (synth)
1831 -- Defined in E_Abstract_State entities. True if the state has a visible
1832 -- null refinement as expressed in aspect/pragma Refined_State.
1834 -- Has_Object_Size_Clause
1835 -- Defined in entities for types and subtypes. Set if an Object_Size
1836 -- clause has been processed for the type. Used to prevent multiple
1837 -- Object_Size clauses for a given entity.
1839 -- Has_Out_Or_In_Out_Parameter
1840 -- Present in subprograms, generic subprograms, entries, and entry
1841 -- families. Set if they have at least one OUT or IN OUT parameter
1842 -- (allowed for functions only in Ada 2012).
1844 -- Has_Own_DIC [base type only]
1845 -- Defined in all type entities. Set for a private type and its full view
1846 -- (and its underlying full view, if the full view is itself private)
1847 -- when the type is subject to pragma Default_Initial_Condition.
1849 -- Has_Own_Invariants [base type only]
1850 -- Defined in all type entities. Set on any type that defines at least
1851 -- one invariant of its own.
1853 -- Note: this flag is set on both partial and full view of types to which
1854 -- an Invariant pragma or aspect applies, and on the underlying full view
1855 -- if the full view is private.
1857 -- Has_Partial_Visible_Refinement
1858 -- Defined in E_Abstract_State entities. Set when a state has at least
1859 -- one refinement constituent subject to indicator Part_Of, and analysis
1860 -- is in the region between the declaration of the first constituent for
1861 -- this abstract state (in the private part of the package) and the end
1862 -- of the package spec or body with visibility over this private part
1863 -- (which includes the package itself and its child packages).
1865 -- Has_Per_Object_Constraint
1866 -- Defined in E_Component entities. Set if the subtype of the component
1867 -- has a per object constraint. Per object constraints result from the
1868 -- following situations:
1870 -- 1. N_Attribute_Reference - when the prefix is the enclosing type and
1871 -- the attribute is Access.
1872 -- 2. N_Discriminant_Association - when the expression uses the
1873 -- discriminant of the enclosing type.
1874 -- 3. N_Index_Or_Discriminant_Constraint - when at least one of the
1875 -- individual constraints is a per object constraint.
1876 -- 4. N_Range - when the lower or upper bound uses the discriminant of
1877 -- the enclosing type.
1878 -- 5. N_Range_Constraint - when the range expression uses the
1879 -- discriminant of the enclosing type.
1881 -- Has_Pragma_Controlled [implementation base type only]
1882 -- Defined in access type entities. It is set if a pragma Controlled
1883 -- applies to the access type.
1885 -- Has_Pragma_Elaborate_Body
1886 -- Defined in all entities. Set in compilation unit entities if a
1887 -- pragma Elaborate_Body applies to the compilation unit.
1889 -- Has_Pragma_Inline
1890 -- Defined in all entities. Set for functions and procedures for which a
1891 -- pragma Inline or Inline_Always applies to the subprogram. Note that
1892 -- this flag can be set even if Is_Inlined is not set. This happens for
1893 -- pragma Inline (if Inline_Active is False). In other words, the flag
1894 -- Has_Pragma_Inline represents the formal semantic status, and is used
1895 -- for checking semantic correctness. The flag Is_Inlined indicates
1896 -- whether inlining is actually active for the entity.
1898 -- Has_Pragma_Inline_Always
1899 -- Defined in all entities. Set for functions and procedures for which a
1900 -- pragma Inline_Always applies. Note that if this flag is set, the flag
1901 -- Has_Pragma_Inline is also set.
1903 -- Has_Pragma_No_Inline
1904 -- Defined in all entities. Set for functions and procedures for which a
1905 -- pragma No_Inline applies. Note that if this flag is set, the flag
1906 -- Has_Pragma_Inline_Always cannot be set.
1908 -- Has_Pragma_Ordered [implementation base type only]
1909 -- Defined in entities for enumeration types. If set indicates that a
1910 -- valid pragma Ordered was given for the type. This flag is inherited
1911 -- by derived enumeration types. We don't need to distinguish the derived
1912 -- case since we allow multiple occurrences of this pragma anyway.
1914 -- Has_Pragma_Pack [implementation base type only]
1915 -- Defined in array and record type entities. If set, indicates that a
1916 -- valid pragma Pack was given for the type. Note that this flag is not
1917 -- inherited by derived type. See also the Is_Packed flag.
1919 -- Has_Pragma_Preelab_Init
1920 -- Defined in type and subtype entities. If set indicates that a valid
1921 -- pragma Preelaborable_Initialization applies to the type.
1923 -- Has_Pragma_Pure
1924 -- Defined in all entities. If set, indicates that a valid pragma Pure
1925 -- was given for the entity. In some cases, we need to test whether
1926 -- Is_Pure was explicitly set using this pragma.
1928 -- Has_Pragma_Pure_Function
1929 -- Defined in all entities. If set, indicates that a valid pragma
1930 -- Pure_Function was given for the entity. In some cases, we need to test
1931 -- whether Is_Pure was explicitly set using this pragma. We also set
1932 -- this flag for some internal entities that we know should be treated
1933 -- as pure for optimization purposes.
1935 -- Has_Pragma_Thread_Local_Storage
1936 -- Defined in all entities. If set, indicates that a valid pragma
1937 -- Thread_Local_Storage was given for the entity.
1939 -- Has_Pragma_Unmodified
1940 -- Defined in all entities. Can only be set for variables (E_Variable,
1941 -- E_Out_Parameter, E_In_Out_Parameter). Set if a valid pragma Unmodified
1942 -- applies to the variable, indicating that no warning should be given
1943 -- if the entity is never modified. Note that clients should generally
1944 -- not test this flag directly, but instead use function Has_Unmodified.
1946 -- Has_Pragma_Unreferenced
1947 -- Defined in all entities. Set if a valid pragma Unreferenced applies
1948 -- to the entity, indicating that no warning should be given if the
1949 -- entity has no references, but a warning should be given if it is
1950 -- in fact referenced. For private types, this flag is set in both the
1951 -- private entity and full entity if the pragma applies to either. Note
1952 -- that clients should generally not test this flag directly, but instead
1953 -- use function Has_Unreferenced.
1955 -- Has_Pragma_Unreferenced_Objects
1956 -- Defined in all entities. Set if a valid pragma Unused applies to an
1957 -- entity, indicating that warnings should be given if the entity is
1958 -- modified or referenced. This pragma is equivalent to a pair of
1959 -- Unmodified and Unreferenced pragmas.
1961 -- Has_Pragma_Unused
1962 -- Defined in all entities. Set if a valid pragma Unused applies to a
1963 -- variable or entity, indicating that warnings should not be given if
1964 -- it is never modified or referenced. Note: This pragma is exactly
1965 -- equivalent Unmodified and Unreference combined.
1967 -- Has_Predicates
1968 -- Defined in type and subtype entities. Set if a pragma Predicate or
1969 -- Predicate aspect applies to the type or subtype, or if it inherits a
1970 -- Predicate aspect from its parent or progenitor types.
1972 -- Note: this flag is set on both partial and full view of types to which
1973 -- a Predicate pragma or aspect applies, and on the underlying full view
1974 -- if the full view is private.
1976 -- Has_Primitive_Operations [base type only]
1977 -- Defined in all type entities. Set if at least one primitive operation
1978 -- is defined for the type.
1980 -- Has_Private_Ancestor
1981 -- Applies to type extensions. True if some ancestor is derived from a
1982 -- private type, making some components invisible and aggregates illegal.
1983 -- This flag is set at the point of derivation. The legality of the
1984 -- aggregate must be rechecked because it also depends on the visibility
1985 -- at the point the aggregate is resolved. See sem_aggr.adb. This is part
1986 -- of AI05-0115.
1988 -- Has_Private_Declaration
1989 -- Defined in all entities. Set if it is the defining entity of a private
1990 -- type declaration or its corresponding full declaration. This flag is
1991 -- thus preserved when the full and the partial views are exchanged, to
1992 -- indicate if a full type declaration is a completion. Used for semantic
1993 -- checks in E.4(18) and elsewhere.
1995 -- Has_Private_Extension
1996 -- Defined in tagged types. Set to indicate that the tagged type has some
1997 -- private extension. Used to report a warning on public primitives added
1998 -- after defining its private extensions.
2000 -- Has_Protected [base type only]
2001 -- Defined in all type entities. Set on protected types themselves, and
2002 -- also (recursively) on any composite type which has a component for
2003 -- which Has_Protected is set, unless the protected type is declared in
2004 -- the private part of an internal unit. The meaning is that restrictions
2005 -- for protected types apply to this type. Note: the flag is not set on
2006 -- access types, even if they designate an object that Has_Protected.
2008 -- Has_Qualified_Name
2009 -- Defined in all entities. Set if the name in the Chars field has
2010 -- been replaced by its qualified name, as used for debug output. See
2011 -- Exp_Dbug for a full description of qualification requirements. For
2012 -- some entities, the name is the fully qualified name, but there are
2013 -- exceptions. In particular, for local variables in procedures, we
2014 -- do not include the procedure itself or higher scopes. See also the
2015 -- flag Has_Fully_Qualified_Name, which is set if the name does indeed
2016 -- include the fully qualified name.
2018 -- Has_RACW
2019 -- Defined in package spec entities. Set if the spec contains the
2020 -- declaration of a remote access-to-classwide type.
2022 -- Has_Record_Rep_Clause [implementation base type only]
2023 -- Defined in record types. Set if a record representation clause has
2024 -- been given for this record type. Used to prevent more than one such
2025 -- clause for a given record type. Note that this is initially cleared
2026 -- for a derived type, even though the representation is inherited. See
2027 -- also the flag Has_Specified_Layout.
2029 -- Has_Recursive_Call
2030 -- Defined in procedures. Set if a direct parameterless recursive call
2031 -- is detected while analyzing the body. Used to activate some error
2032 -- checks for infinite recursion.
2034 -- Has_Shift_Operator [base type only]
2035 -- Defined in integer types. Set in the base type of an integer type for
2036 -- which at least one of the shift operators is defined.
2038 -- Has_Size_Clause
2039 -- Defined in entities for types and objects. Set if a size or value size
2040 -- clause is defined for the entity. Used to prevent multiple clauses
2041 -- for a given entity. Note that it is always initially cleared for a
2042 -- derived type, even though the Size or Value_Size clause for such a
2043 -- type might be inherited from an ancestor type.
2045 -- Has_Small_Clause
2046 -- Defined in ordinary fixed point types (but not subtypes). Indicates
2047 -- that a small clause has been given for the entity. Used to prevent
2048 -- multiple Small clauses for a given entity. Note that it is always
2049 -- initially cleared for a derived type, even though the Small for such
2050 -- a type is inherited from a Small clause given for the parent type.
2052 -- Has_Specified_Layout [implementation base type only]
2053 -- Defined in all type entities. Set for a record type or subtype if
2054 -- the record layout has been specified by a record representation
2055 -- clause. Note that this differs from the flag Has_Record_Rep_Clause
2056 -- in that it is inherited by a derived type. Has_Record_Rep_Clause is
2057 -- used to indicate that the type is mentioned explicitly in a record
2058 -- representation clause, and thus is not inherited by a derived type.
2059 -- This flag is always False for non-record types.
2061 -- Has_Specified_Stream_Input
2062 -- Has_Specified_Stream_Output
2063 -- Has_Specified_Stream_Read
2064 -- Has_Specified_Stream_Write
2065 -- Defined in all type and subtype entities. Set for a given view if the
2066 -- corresponding stream-oriented attribute has been defined by an
2067 -- attribute definition clause. When such a clause occurs, a TSS is set
2068 -- on the underlying full view; the flags are used to track visibility of
2069 -- the attribute definition clause for partial or incomplete views.
2071 -- Has_Static_Discriminants
2072 -- Defined in record subtypes constrained by discriminant values. Set if
2073 -- all the discriminant values have static values, meaning that in the
2074 -- case of a variant record, the component list can be trimmed down to
2075 -- include only the components corresponding to these discriminants.
2077 -- Has_Static_Predicate
2078 -- Defined in all types and subtypes. Set if the type (which must be a
2079 -- scalar type) has a predicate whose expression is predicate-static.
2080 -- This can result from the use of any Predicate, Static_Predicate, or
2081 -- Dynamic_Predicate aspect. We can distinguish these cases by testing
2082 -- Has_Static_Predicate_Aspect and Has_Dynamic_Predicate_Aspect. See
2083 -- description of the latter flag for further information on dynamic
2084 -- predicates which are also static.
2086 -- Has_Static_Predicate_Aspect
2087 -- Defined in all types and subtypes. Set if a Static_Predicate aspect
2088 -- applies to the type. Note that we can tell if a static predicate is
2089 -- present by looking at Has_Static_Predicate, but this could have come
2090 -- from a Predicate aspect or pragma or even from a Dynamic_Predicate
2091 -- aspect. When we need to know the difference (e.g. to know what set of
2092 -- check policies apply, use this flag and Has_Dynamic_Predicate_Aspect
2093 -- to determine which case we have).
2095 -- Has_Storage_Size_Clause [implementation base type only]
2096 -- Defined in task types and access types. It is set if a Storage_Size
2097 -- clause is present for the type. Used to prevent multiple clauses for
2098 -- one type. Note that this flag is initially cleared for a derived type
2099 -- even though the Storage_Size for such a type is inherited from a
2100 -- Storage_Size clause given for the parent type. Note that in the case
2101 -- of access types, this flag is defined only in the root type, since a
2102 -- storage size clause cannot be given to a derived type.
2104 -- Has_Stream_Size_Clause
2105 -- Defined in all entities. It is set for types which have a Stream_Size
2106 -- clause attribute. Used to prevent multiple Stream_Size clauses for a
2107 -- given entity, and also whether it is necessary to check for a stream
2108 -- size clause.
2110 -- Has_Task [base type only]
2111 -- Defined in all type entities. Set on task types themselves, and also
2112 -- (recursively) on any composite type which has a component for which
2113 -- Has_Task is set. The meaning is that an allocator or declaration of
2114 -- such an object must create the required tasks. Note: the flag is not
2115 -- set on access types, even if they designate an object that Has_Task.
2117 -- Has_Timing_Event [base type only]
2118 -- Defined in all type entities. Set on language defined type
2119 -- Ada.Real_Time.Timing_Events.Timing_Event, and also (recursively) on
2120 -- any composite type which has a component for which Has_Timing_Event
2121 -- is set. Used for the No_Local_Timing_Event restriction.
2123 -- Has_Thunks
2124 -- Applies to E_Constant entities marked Is_Tag. True for secondary tag
2125 -- referencing a dispatch table whose contents are pointers to thunks.
2127 -- Has_Unchecked_Union [base type only]
2128 -- Defined in all type entities. Set on unchecked unions themselves
2129 -- and (recursively) on any composite type which has a component for
2130 -- which Has_Unchecked_Union is set. The meaning is that a comparison
2131 -- operation or 'Valid_Scalars reference for the type is not permitted.
2132 -- Note that the flag is not set on access types, even if they designate
2133 -- an object that has the flag Has_Unchecked_Union set.
2135 -- Has_Unknown_Discriminants
2136 -- Defined in all entities. Set for types with unknown discriminants.
2137 -- Types can have unknown discriminants either from their declaration or
2138 -- through type derivation. The use of this flag exactly meets the spec
2139 -- in RM 3.7(26). Note that all class-wide types are considered to have
2140 -- unknown discriminants. Note that both flags Has_Discriminants and
2141 -- Has_Unknown_Discriminants may be true for a type. Class-wide types and
2142 -- their subtypes have unknown discriminants and can have declared ones
2143 -- as well. Private types declared with unknown discriminants may have a
2144 -- full view that has explicit discriminants, and both flag will be set
2145 -- on the partial view, to ensure that discriminants are properly
2146 -- inherited in certain contexts.
2148 -- Has_Visible_Refinement
2149 -- Defined in E_Abstract_State entities. Set when a state has at least
2150 -- one refinement constituent and analysis is in the region between
2151 -- pragma Refined_State and the end of the package body declarations.
2153 -- Has_Volatile_Components [implementation base type only]
2154 -- Defined in all types and objects. Set only for an array type or array
2155 -- object if a valid pragma Volatile_Components or a valid pragma
2156 -- Atomic_Components applies to the type or object. Note that in the case
2157 -- of an object, this flag is only set on the object if there was an
2158 -- explicit pragma for the object. In other words, the proper test for
2159 -- whether an object has volatile components is to see if either the
2160 -- object or its base type has this flag set. Note that in the case of a
2161 -- type the pragma will be chained to the rep item chain of the first
2162 -- subtype in the usual manner.
2164 -- Has_Xref_Entry
2165 -- Defined in all entities. Set if an entity has an entry in the Xref
2166 -- information generated in ali files. This is true for all source
2167 -- entities in the extended main source file. It is also true of entities
2168 -- in other packages that are referenced directly or indirectly from the
2169 -- main source file (indirect reference occurs when the main source file
2170 -- references an entity with a type reference. See package Lib.Xref for
2171 -- further details).
2173 -- Has_Yield_Aspect
2174 -- Defined in subprograms, generic subprograms, entries, entry families.
2175 -- Set if the entity has aspect Yield.
2177 -- Hiding_Loop_Variable
2178 -- Defined in variables. Set only if a variable of a discrete type is
2179 -- hidden by a loop variable in the same local scope, in which case
2180 -- the Hiding_Loop_Variable field of the hidden variable points to
2181 -- the E_Loop_Parameter entity doing the hiding. Used in processing
2182 -- warning messages if the hidden variable turns out to be unused
2183 -- or is referenced without being set.
2185 -- Hidden_In_Formal_Instance
2186 -- Defined on actuals for formal packages. Entities on the list are
2187 -- formals that are hidden outside of the formal package when this
2188 -- package is not declared with a box, or the formal itself is not
2189 -- defaulted (see RM 12.7 (10)). Their visibility is restored on exit
2190 -- from the current generic, because the actual for the formal package
2191 -- may be used subsequently in the current unit.
2193 -- Homonym
2194 -- Defined in all entities. Link for list of entities that have the
2195 -- same source name and that are declared in the same or enclosing
2196 -- scopes. Homonyms in the same scope are overloaded. Used for name
2197 -- resolution and for the generation of debugging information.
2199 -- Ignore_SPARK_Mode_Pragmas
2200 -- Present in concurrent type, entry, operator, [generic] package,
2201 -- package body, [generic] subprogram, and subprogram body entities.
2202 -- Set when the entity appears in an instance subject to SPARK_Mode
2203 -- "off" and indicates that all SPARK_Mode pragmas found within must
2204 -- be ignored.
2206 -- Ignored_Class_Postconditions
2207 -- Defined on subprogram entities. Set if the subprogram has class-wide
2208 -- postconditions. Denotes the (and-then) expression built by merging
2209 -- inherited ignored class-wide postconditions with its own ignored
2210 -- class-wide postconditions.
2212 -- Ignored_Class_Preconditions
2213 -- Defined on subprogram entities. Set if the subprogram has class-wide
2214 -- preconditions. Denotes the (or-else) expression built by merging
2215 -- inherited ignored class-wide preconditions with its own ignored
2216 -- class-wide preconditions.
2218 -- Implementation_Base_Type (synthesized)
2219 -- Applies to all entities. For types, similar to Base_Type, but never
2220 -- returns a private type when applied to a non-private type. Instead in
2221 -- this case, it always returns the Underlying_Type of the base type, so
2222 -- that we still have a concrete type. For entities other than types,
2223 -- returns the entity unchanged.
2225 -- Import_Pragma
2226 -- Defined in subprogram entities. Set if a valid pragma Import or pragma
2227 -- Import_Function or pragma Import_Procedure applies to the subprogram,
2228 -- in which case this field points to the pragma (we can't use the normal
2229 -- Rep_Item chain mechanism, because a single pragma Import can apply
2230 -- to multiple subprogram entities).
2232 -- In_Package_Body
2233 -- Defined in package entities. Set on the entity that denotes the
2234 -- package (the defining occurrence of the package declaration) while
2235 -- analyzing and expanding the package body. Reset on completion of
2236 -- analysis/expansion.
2238 -- In_Private_Part
2239 -- Defined in all entities. Can be set only in package entities and
2240 -- objects. For package entities, this flag is set to indicate that the
2241 -- private part of the package is being analyzed. The flag is reset at
2242 -- the end of the package declaration. For objects it indicates that the
2243 -- declaration of the object occurs in the private part of a package.
2245 -- Incomplete_Actuals
2246 -- Defined on package entities that are instances. Indicates the actuals
2247 -- types in the instantiation that are limited views. If this list is
2248 -- not empty, the instantiation, which appears in a package declaration,
2249 -- is relocated to the corresponding package body, which must have a
2250 -- corresponding nonlimited with_clause.
2252 -- Indirect_Call_Wrapper
2253 -- Defined on subprogram entities. Set if the subprogram has class-wide
2254 -- preconditions. Denotes the internal wrapper that checks preconditions
2255 -- and invokes the subprogram body. Subp'Access points to the indirect
2256 -- call wrapper if available.
2258 -- Initialization_Statements
2259 -- Defined in constants and variables. For a composite object initialized
2260 -- with an aggregate that has been converted to a sequence of
2261 -- assignments, points to a compound statement containing the
2262 -- assignments.
2264 -- Inner_Instances
2265 -- Defined in generic units. Contains element list of units that are
2266 -- instantiated within the given generic. Used to diagnose circular
2267 -- instantiations.
2269 -- Interface_Alias
2270 -- Defined in subprograms that cover a primitive operation of an abstract
2271 -- interface type. Can be set only if the Is_Hidden flag is also set,
2272 -- since such entities are always hidden. Points to its associated
2273 -- interface subprogram. It is used to register the subprogram in
2274 -- secondary dispatch table of the interface (Ada 2005: AI-251).
2276 -- Interface_Name
2277 -- Defined in constants, variables, exceptions, functions, procedures,
2278 -- and packages. Set to Empty unless an export, import, or interface name
2279 -- pragma has explicitly specified an external name, in which case it
2280 -- references an N_String_Literal node for the specified external name.
2281 -- Note that if this field is Empty, and Is_Imported or Is_Exported is
2282 -- set, then the default interface name is the name of the entity, cased
2283 -- in a manner that is appropriate to the system in use. Note that
2284 -- Interface_Name is ignored if an address clause is present (since it
2285 -- is meaningless in this case).
2287 -- Interfaces
2288 -- Defined in record types and subtypes. List of abstract interfaces
2289 -- implemented by a tagged type that are not already implemented by the
2290 -- ancestors (Ada 2005: AI-251).
2292 -- Invariant_Procedure (synthesized)
2293 -- Defined in types and subtypes. Set for private types and their full
2294 -- views if one or more [class-wide] invariants apply to the type, or
2295 -- when the type inherits class-wide invariants from a parent type or
2296 -- an interface, or when the type is an array and its component type is
2297 -- subject to an invariant, or when the type is record and contains a
2298 -- component subject to an invariant (property is recursive). Points to
2299 -- to the entity for a procedure which checks all these invariants. The
2300 -- invariant procedure takes a single argument of the given type, and
2301 -- returns if the invariant holds, or raises exception Assertion_Error
2302 -- with an appropriate message if it does not hold. This attribute is
2303 -- defined but always Empty for private subtypes.
2305 -- Note: the reason this is marked as a synthesized attribute is that the
2306 -- way this is stored is as an element of the Subprograms_For_Type field.
2308 -- In_Use
2309 -- Defined in packages and types. Set when analyzing a use clause for
2310 -- the corresponding entity. Reset at end of corresponding declarative
2311 -- part. The flag on a type is also used to determine the visibility of
2312 -- the primitive operators of the type.
2314 -- Note that manipulation of scopes on the scope stack will also cause
2315 -- the flag to be set/unset since the setting of scopes affects
2316 -- visibility.
2318 -- Is_Abstract_Subprogram
2319 -- Defined in all subprograms and entries. Set for abstract subprograms.
2320 -- Always False for enumeration literals and entries. See also
2321 -- Requires_Overriding.
2323 -- Is_Abstract_Type
2324 -- Defined in all types. Set for abstract types.
2326 -- Is_Access_Constant
2327 -- Defined in access types and subtypes. Indicates that the keyword
2328 -- constant was present in the access type definition.
2330 -- Is_Access_Protected_Subprogram_Type (synthesized)
2331 -- Applies to all types, true for named and anonymous access to
2332 -- protected subprograms.
2334 -- Is_Access_Type (synthesized)
2335 -- Applies to all entities, true for access types and subtypes
2337 -- Is_Access_Object_Type (synthesized)
2338 -- Applies to all entities, true for access-to-object types and subtypes
2340 -- Is_Activation_Record
2341 -- Applies to E_In_Parameters generated in Exp_Unst for nested
2342 -- subprograms, to mark the added formal that carries the activation
2343 -- record created in the enclosing subprogram.
2345 -- Is_Actual_Subtype
2346 -- Defined on all types, true for the generated constrained subtypes
2347 -- that are built for unconstrained composite actuals.
2349 -- Is_Ada_2005_Only
2350 -- Defined in all entities, true if a valid pragma Ada_05 or Ada_2005
2351 -- applies to the entity which specifically names the entity, indicating
2352 -- that the entity is Ada 2005 only. Note that this flag is not set if
2353 -- the entity is part of a unit compiled with the normal no-argument form
2354 -- of pragma Ada_05 or Ada_2005.
2356 -- Is_Ada_2012_Only
2357 -- Defined in all entities, true if a valid pragma Ada_12 or Ada_2012
2358 -- applies to the entity which specifically names the entity, indicating
2359 -- that the entity is Ada 2012 only. Note that this flag is not set if
2360 -- the entity is part of a unit compiled with the normal no-argument form
2361 -- of pragma Ada_12 or Ada_2012.
2363 -- Is_Ada_2022_Only
2364 -- Defined in all entities, true if a valid pragma Ada_2022 applies to
2365 -- the entity which specifically names the entity, indicating that the
2366 -- entity is Ada 2022 only. Note that this flag is not set if the entity
2367 -- is part of a unit compiled with the normal no-argument form of pragma
2368 -- Ada_2022.
2370 -- Is_Aliased
2371 -- Defined in all entities. Set for objects and types whose declarations
2372 -- carry the keyword aliased, and on record components that have the
2373 -- keyword. For Ada 2012, also applies to formal parameters.
2375 -- Is_Array_Type (synthesized)
2376 -- Applies to all entities, true for array types and subtypes
2378 -- Is_Asynchronous
2379 -- Defined in all type entities and in procedure entities. Set
2380 -- if a pragma Asynchronous applies to the entity.
2382 -- Is_Atomic
2383 -- Defined in all type entities, and also in constants, components, and
2384 -- variables. Set if a pragma Atomic or Shared applies to the entity.
2385 -- In the case of private and incomplete types, this flag is set in
2386 -- both the partial view and the full view.
2388 -- Is_Full_Access (synth)
2389 -- Defined in all type entities, and also in constants, components and
2390 -- variables. Set if an aspect/pragma Atomic/Shared, or an aspect/pragma
2391 -- Volatile_Full_Access or an Ada 2022 aspect Full_Access_Only applies
2392 -- to the entity. In the case of private and incomplete types, the flag
2393 -- applies to both the partial view and the full view.
2395 -- Is_Base_Type (synthesized)
2396 -- Applies to type and subtype entities. True if entity is a base type.
2398 -- Is_Bit_Packed_Array [implementation base type only]
2399 -- Defined in all entities. This flag is set for a packed array type that
2400 -- is bit-packed (i.e. the component size is known by the front end and
2401 -- is in the range 1-63 but not a multiple of 8). Is_Packed is always set
2402 -- if Is_Bit_Packed_Array is set, but it is possible for Is_Packed to be
2403 -- set without Is_Bit_Packed_Array if the component size is not known by
2404 -- the front-end or for the case of an array having one or more index
2405 -- types that are enumeration types with non-standard representation.
2407 -- Is_Boolean_Type (synthesized)
2408 -- Applies to all entities, true for boolean types and subtypes,
2409 -- i.e. Standard.Boolean and all types ultimately derived from it.
2411 -- Is_Called
2412 -- Defined in subprograms and packages. Set if a subprogram is called
2413 -- from the unit being compiled or a unit in the closure. Also set for
2414 -- a package that contains called subprograms. Used only for inlining.
2416 -- Is_Character_Type
2417 -- Defined in all entities. Set for character types and subtypes,
2418 -- i.e. enumeration types that have at least one character literal.
2420 -- Is_Checked_Ghost_Entity
2421 -- Applies to all entities. Set for abstract states, [generic] packages,
2422 -- [generic] subprograms, components, discriminants, formal parameters,
2423 -- objects, package bodies, subprogram bodies, and [sub]types subject to
2424 -- pragma Ghost or inherit "ghostness" from an enclosing construct, and
2425 -- subject to Assertion_Policy Ghost => Check.
2427 -- Is_Child_Unit
2428 -- Defined in all entities. Set only for defining entities of program
2429 -- units that are child units (but False for subunits).
2431 -- Is_Class_Wide_Equivalent_Type
2432 -- Defined in record types and subtypes. Set to True, if the type acts
2433 -- as a class-wide equivalent type, i.e. the Equivalent_Type field of
2434 -- some class-wide subtype entity references this record type.
2436 -- Is_Class_Wide_Type (synthesized)
2437 -- Applies to all entities, true for class wide types and subtypes
2439 -- Is_Class_Wide_Wrapper
2440 -- Defined in subprogram entities. Indicates that it has been created as
2441 -- a wrapper in a generic/instance scenario involving a formal type and
2442 -- a generic primitive operation when the actual is a class-wide type.
2444 -- Is_Compilation_Unit
2445 -- Defined in all entities. Set if the entity is a package or subprogram
2446 -- entity for a compilation unit other than a subunit (since we treat
2447 -- subunits as part of the same compilation operation as the ultimate
2448 -- parent, we do not consider them to be separate units for this flag).
2450 -- Is_Completely_Hidden
2451 -- Defined on discriminants. Only set on stored discriminants of
2452 -- untagged types. When set, the entity is a stored discriminant of a
2453 -- derived untagged type which is not directly visible in the derived
2454 -- type because the derived type or one of its ancestors have renamed the
2455 -- discriminants in the root type. Note: there are stored discriminants
2456 -- which are not Completely_Hidden (e.g. discriminants of a root type).
2458 -- Is_Composite_Type (synthesized)
2459 -- Applies to all entities, true for all composite types and subtypes.
2460 -- Either Is_Composite_Type or Is_Elementary_Type (but not both) is true
2461 -- of any type.
2463 -- Is_Concurrent_Record_Type
2464 -- Defined in record types and subtypes. Set if the type was created
2465 -- by the expander to represent a task or protected type. For every
2466 -- concurrent type, such as record type is constructed, and task and
2467 -- protected objects are instances of this record type at run time
2468 -- (The backend will replace declarations of the concurrent type using
2469 -- the declarations of the corresponding record type). See Exp_Ch9 for
2470 -- further details.
2472 -- Is_Concurrent_Type (synthesized)
2473 -- Applies to all entities, true for task types and subtypes and for
2474 -- protected types and subtypes.
2476 -- Is_Constant_Object (synthesized)
2477 -- Applies to all entities, true for E_Constant, E_Loop_Parameter, and
2478 -- E_In_Parameter entities.
2480 -- Is_Constrained
2481 -- Defined in types or subtypes which may have index, discriminant
2482 -- or range constraint (i.e. array types and subtypes, record types
2483 -- and subtypes, string types and subtypes, and all numeric types).
2484 -- Set if the type or subtype is constrained.
2486 -- Is_Constr_Subt_For_U_Nominal
2487 -- Defined in all types and subtypes. Set only for the constructed
2488 -- subtype of an object whose nominal subtype is unconstrained. Note
2489 -- that the constructed subtype itself will be constrained.
2491 -- Is_Constr_Subt_For_UN_Aliased
2492 -- Defined in all types and subtypes. This flag can be set only if
2493 -- Is_Constr_Subt_For_U_Nominal is also set. It indicates that in
2494 -- addition the object concerned is aliased. This flag is used by
2495 -- the backend to determine whether a template must be constructed.
2497 -- Is_Constructor
2498 -- Defined in function and procedure entities. Set if a pragma
2499 -- CPP_Constructor applies to the subprogram.
2501 -- Is_Controlled_Active [base type only]
2502 -- Defined in all type entities. Indicates that the type is controlled,
2503 -- i.e. is either a descendant of Ada.Finalization.Controlled or of
2504 -- Ada.Finalization.Limited_Controlled.
2506 -- Is_Controlled (synth) [base type only]
2507 -- Defined in all type entities. Set if Is_Controlled_Active is set for
2508 -- the type, and Disable_Controlled is not set.
2510 -- Is_Controlling_Formal
2511 -- Defined in all Formal_Kind entities. Marks the controlling parameters
2512 -- of dispatching operations.
2514 -- Is_CPP_Class
2515 -- Defined in all type entities, set only for tagged types to which a
2516 -- valid pragma Import (CPP, ...) or pragma CPP_Class has been applied.
2518 -- Is_CUDA_Kernel
2519 -- Defined in function and procedure entities. Set if the subprogram is a
2520 -- CUDA kernel.
2522 -- Is_Decimal_Fixed_Point_Type (synthesized)
2523 -- Applies to all type entities, true for decimal fixed point
2524 -- types and subtypes.
2526 -- Is_Descendant_Of_Address
2527 -- Defined in all entities. True if the entity is type System.Address,
2528 -- or (recursively) a subtype or derived type of System.Address.
2530 -- Is_DIC_Procedure
2531 -- Defined in functions and procedures. Set for a generated procedure
2532 -- which verifies the assumption of pragma Default_Initial_Condition at
2533 -- run time.
2535 -- Is_Discrete_Or_Fixed_Point_Type (synthesized)
2536 -- Applies to all entities, true for all discrete types and subtypes
2537 -- and all fixed-point types and subtypes.
2539 -- Is_Discrete_Type (synthesized)
2540 -- Applies to all entities, true for all discrete types and subtypes
2542 -- Is_Discrim_SO_Function
2543 -- Defined in all entities. Set only in E_Function entities that Layout
2544 -- creates to compute discriminant-dependent dynamic size/offset values.
2546 -- Is_Discriminant_Check_Function
2547 -- Defined in all entities. Set only in E_Function entities for functions
2548 -- created to do discriminant checks.
2550 -- Is_Discriminal (synthesized)
2551 -- Applies to all entities, true for renamings of discriminants. Such
2552 -- entities appear as constants or IN parameters.
2554 -- Is_Dispatch_Table_Entity
2555 -- Applies to all entities. Set to indicate to the backend that this
2556 -- entity is associated with a dispatch table.
2558 -- Is_Dispatch_Table_Wrapper
2559 -- Applies to all entities. Set on wrappers built when the subprogram has
2560 -- class-wide preconditions or class-wide postconditions affected by
2561 -- overriding (AI12-0195).
2563 -- Is_Dispatching_Operation
2564 -- Defined in all entities. Set for procedures, functions, generic
2565 -- procedures, and generic functions if the corresponding operation
2566 -- is dispatching.
2568 -- Is_Dynamic_Scope (synthesized)
2569 -- Applies to all Entities. Returns True if the entity is a dynamic
2570 -- scope (i.e. a block, subprogram, task_type, entry or extended return
2571 -- statement).
2573 -- Is_Elaboration_Checks_OK_Id
2574 -- Defined in elaboration targets (see terminology in Sem_Elab). Set when
2575 -- the target appears in a region which is subject to enabled elaboration
2576 -- checks. Such targets are allowed to generate run-time conditional ABE
2577 -- checks or guaranteed ABE failures.
2579 -- Is_Elaboration_Target (synthesized)
2580 -- Applies to all entities, True only for elaboration targets (see the
2581 -- terminology in Sem_Elab).
2583 -- Is_Elaboration_Warnings_OK_Id
2584 -- Defined in elaboration targets (see terminology in Sem_Elab). Set when
2585 -- the target appears in a region with elaboration warnings enabled.
2587 -- Is_Elementary_Type (synthesized)
2588 -- Applies to all entities, True for all elementary types and subtypes.
2589 -- Either Is_Composite_Type or Is_Elementary_Type (but not both) is true
2590 -- of any type.
2592 -- Is_Eliminated
2593 -- Defined in type entities, subprogram entities, and object entities.
2594 -- Indicates that the corresponding entity has been eliminated by use
2595 -- of pragma Eliminate. Also used to mark subprogram entities whose
2596 -- declaration and body are within unreachable code that is removed.
2598 -- Is_Entry (synthesized)
2599 -- Applies to all entities, True only for entry and entry family
2600 -- entities and False for all other entity kinds.
2602 -- Is_Entry_Formal
2603 -- Defined in all entities. Set only for entry formals (which can only
2604 -- be in, in-out or out parameters). This flag is used to speed up the
2605 -- test for the need to replace references in Exp_Ch2.
2607 -- Is_Entry_Wrapper
2608 -- Defined on wrappers created for entries that have precondition or
2609 -- postcondition aspects.
2611 -- Is_Enumeration_Type (synthesized)
2612 -- Defined in all entities, true for enumeration types and subtypes
2614 -- Is_Exception_Handler
2615 -- Defined in blocks. Set if the block serves only as a scope of an
2616 -- exception handler with a choice parameter. Such a block does not
2617 -- physically appear in the tree.
2619 -- Is_Exported
2620 -- Defined in all entities. Set if the entity is exported. For now we
2621 -- only allow the export of constants, exceptions, functions, procedures
2622 -- and variables, but that may well change later on. Exceptions can only
2623 -- be exported in the Java VM implementation of GNAT, which is retired.
2625 -- Is_External_State (synthesized)
2626 -- Applies to all entities, true for abstract states that are subject to
2627 -- option External or Synchronous.
2629 -- Is_Finalized_Transient
2630 -- Defined in constants, loop parameters of generalized iterators, and
2631 -- variables. Set when a transient object has been finalized by one of
2632 -- the transient finalization mechanisms. The flag prevents the double
2633 -- finalization of the object.
2635 -- Is_Finalizer (synthesized)
2636 -- Applies to all entities, true for procedures containing finalization
2637 -- code to process local or library level objects.
2639 -- Is_First_Subtype
2640 -- Defined in all entities. True for first subtypes (RM 3.2.1(6)),
2641 -- i.e. the entity in the type declaration that introduced the type.
2642 -- This may be the base type itself (e.g. for record declarations and
2643 -- enumeration type declarations), or it may be the first subtype of
2644 -- an anonymous base type (e.g. for integer type declarations or
2645 -- constrained array declarations).
2647 -- Is_Fixed_Lower_Bound_Array_Subtype
2648 -- Defined in type entities. True for unconstrained array types and
2649 -- subtypes where at least one index has a range specified with a fixed
2650 -- lower bound (range syntax is "<expression> .. <>").
2652 -- Is_Fixed_Lower_Bound_Index_Subtype
2653 -- Defined in type entities. True for an index of an unconstrained array
2654 -- type or subtype whose range is specified with a fixed lower bound
2655 -- (range syntax is "<expression> .. <>").
2657 -- Is_Fixed_Point_Type (synthesized)
2658 -- Applies to all entities, true for decimal and ordinary fixed
2659 -- point types and subtypes.
2661 -- Is_Floating_Point_Type (synthesized)
2662 -- Applies to all entities, true for float types and subtypes
2664 -- Is_Formal (synthesized)
2665 -- Applies to all entities, true for IN, IN OUT and OUT parameters
2667 -- Is_Formal_Object (synthesized)
2668 -- Applies to all entities, true for generic IN and IN OUT parameters
2670 -- Is_Formal_Subprogram
2671 -- Defined in all entities. Set for generic formal subprograms.
2673 -- Is_Frozen
2674 -- Defined in all type and subtype entities. Set if type or subtype has
2675 -- been frozen.
2677 -- Is_Generic_Actual_Subprogram
2678 -- Defined on functions and procedures. Set on the entity of the renaming
2679 -- declaration created within an instance for an actual subprogram.
2680 -- Used to generate constraint checks on calls to these subprograms, even
2681 -- within an instance of a predefined run-time unit, in which checks
2682 -- are otherwise suppressed.
2684 -- Is_Generic_Actual_Type
2685 -- Defined in all type and subtype entities. Set in the subtype
2686 -- declaration that renames the generic formal as a subtype of the
2687 -- actual. Guarantees that the subtype is not static within the instance.
2688 -- Also used during analysis of an instance, to simplify resolution of
2689 -- accidental overloading that occurs when different formal types get the
2690 -- same actual.
2692 -- Is_Generic_Instance
2693 -- Defined in all entities. Set to indicate that the entity is an
2694 -- instance of a generic unit, or a formal package (which is an instance
2695 -- of the template).
2697 -- Is_Generic_Subprogram (synthesized)
2698 -- Applies to all entities. Yields True for a generic subprogram
2699 -- (generic function, generic subprogram), False for all other entities.
2701 -- Is_Generic_Type
2702 -- Defined in all entities. Set for types which are generic formal types.
2703 -- Such types have an Ekind that corresponds to their classification, so
2704 -- the Ekind cannot be used to identify generic formal types.
2706 -- Is_Generic_Unit (synthesized)
2707 -- Applies to all entities. Yields True for a generic unit (generic
2708 -- package, generic function, generic procedure), and False for all
2709 -- other entities.
2711 -- Is_Ghost_Entity (synthesized)
2712 -- Applies to all entities. Yields True for abstract states, [generic]
2713 -- packages, [generic] subprograms, components, discriminants, formal
2714 -- parameters, objects, package bodies, subprogram bodies, and [sub]types
2715 -- subject to pragma Ghost or those that inherit the Ghost property from
2716 -- an enclosing construct.
2718 -- Is_Hidden
2719 -- Defined in all entities. Set for all entities declared in the
2720 -- private part or body of a package. Also marks generic formals of a
2721 -- formal package declared without a box. For library level entities,
2722 -- this flag is set if the entity is not publicly visible. This flag
2723 -- is reset when compiling the body of the package where the entity
2724 -- is declared, when compiling the private part or body of a public
2725 -- child unit, and when compiling a private child unit (see Install_
2726 -- Private_Declaration in sem_ch7).
2728 -- Is_Hidden_Non_Overridden_Subpgm
2729 -- Defined in all entities. Set for implicitly declared subprograms
2730 -- that require overriding or are null procedures, and are hidden by
2731 -- a non-fully conformant homograph with the same characteristics
2732 -- (Ada RM 8.3 12.3/2).
2734 -- Is_Hidden_Open_Scope
2735 -- Defined in all entities. Set for a scope that contains the
2736 -- instantiation of a child unit, and whose entities are not visible
2737 -- during analysis of the instance.
2739 -- Is_Ignored_Ghost_Entity
2740 -- Applies to all entities. Set for abstract states, [generic] packages,
2741 -- [generic] subprograms, components, discriminants, formal parameters,
2742 -- objects, package bodies, subprogram bodies, and [sub]types subject to
2743 -- pragma Ghost or inherit "ghostness" from an enclosing construct, and
2744 -- subject to Assertion_Policy Ghost => Ignore.
2746 -- Is_Ignored_Transient
2747 -- Defined in constants, loop parameters of generalized iterators, and
2748 -- variables. Set when a transient object must be processed by one of
2749 -- the transient finalization mechanisms. Once marked, a transient is
2750 -- intentionally ignored by the general finalization mechanism because
2751 -- its clean up actions are context specific.
2753 -- Is_Immediately_Visible
2754 -- Defined in all entities. Set if entity is immediately visible, i.e.
2755 -- is defined in some currently open scope (RM 8.3(4)).
2757 -- Is_Implementation_Defined
2758 -- Defined in all entities. Set if a pragma Implementation_Defined is
2759 -- applied to the pragma. Used to mark all implementation defined
2760 -- identifiers in standard library packages, and to implement the
2761 -- restriction No_Implementation_Identifiers.
2763 -- Is_Imported
2764 -- Defined in all entities. Set if the entity is imported. For now we
2765 -- only allow the import of exceptions, functions, procedures, packages,
2766 -- constants, and variables. Exceptions, packages, and types can only be
2767 -- imported in the Java VM implementation, which is retired.
2769 -- Is_Incomplete_Or_Private_Type (synthesized)
2770 -- Applies to all entities, true for private and incomplete types
2772 -- Is_Incomplete_Type (synthesized)
2773 -- Applies to all entities, true for incomplete types and subtypes
2775 -- Is_Independent
2776 -- Defined in all types and objects. Set if a valid pragma or aspect
2777 -- Independent applies to the entity, or for a component if a valid
2778 -- pragma or aspect Independent_Components applies to the enclosing
2779 -- record type. Also set if a pragma Shared or pragma Atomic applies to
2780 -- the entity, or if the declaration of the entity carries the Aliased
2781 -- keyword. For Ada 2012, also applies to formal parameters. In the
2782 -- case of private and incomplete types, this flag is set in both the
2783 -- partial view and the full view.
2785 -- Is_Initial_Condition_Procedure
2786 -- Defined in functions and procedures. Set for a generated procedure
2787 -- which verifies the assumption of pragma Initial_Condition at run time.
2789 -- Is_Inlined
2790 -- Defined in all entities. Set for functions and procedures which are
2791 -- to be inlined. For subprograms created during expansion, this flag
2792 -- may be set directly by the expander to request inlining. Also set
2793 -- for packages that contain inlined subprograms, whose bodies must be
2794 -- be compiled. Is_Inlined is also set on generic subprograms and is
2795 -- inherited by their instances. It is also set on the body entities
2796 -- of inlined subprograms. See also Has_Pragma_Inline.
2798 -- Is_Inlined_Always
2799 -- Defined in subprograms. Set for functions and procedures which are
2800 -- always inlined in GNATprove mode. GNATprove uses this flag to know
2801 -- when a body does not need to be analyzed. The value of this flag is
2802 -- only meaningful if Body_To_Inline is not Empty for the subprogram.
2804 -- Is_Instantiated
2805 -- Defined in generic packages and generic subprograms. Set if the unit
2806 -- is instantiated from somewhere in the extended main source unit. This
2807 -- flag is used to control warnings about the unit being uninstantiated.
2808 -- Also set in a package that is used as an actual for a generic package
2809 -- formal in an instantiation. Also set on a parent instance, in the
2810 -- instantiation of a child, which is implicitly declared in the parent.
2812 -- Is_Integer_Type (synthesized)
2813 -- Applies to all entities, true for integer types and subtypes
2815 -- Is_Interface
2816 -- Defined in record types and subtypes. Set to indicate that the current
2817 -- entity corresponds to an abstract interface. Because abstract
2818 -- interfaces are conceptually a special kind of abstract tagged type
2819 -- we represent them by means of tagged record types and subtypes
2820 -- marked with this attribute. This allows us to reuse most of the
2821 -- compiler support for abstract tagged types to implement interfaces
2822 -- (Ada 2005: AI-251).
2824 -- Is_Internal
2825 -- Defined in all entities. Set to indicate an entity created during
2826 -- semantic processing (e.g. an implicit type, or a temporary). The
2827 -- current uses of this flag are:
2829 -- 1) Internal entities (such as temporaries generated for the result
2830 -- of an inlined function call or dummy variables generated for the
2831 -- debugger). Set to indicate that they need not be initialized, even
2832 -- when scalars are initialized or normalized.
2834 -- 2) Predefined primitives of tagged types. Set to mark that they
2835 -- have specific properties: first they are primitives even if they
2836 -- are not defined in the type scope (the freezing point is not
2837 -- necessarily in the same scope), and second the predefined equality
2838 -- can be overridden by a user-defined equality, no body will be
2839 -- generated in this case.
2841 -- 3) Object declarations generated by the expander that are implicitly
2842 -- imported or exported so that they can be marked in Sprint output.
2844 -- 4) Internal entities in the list of primitives of tagged types that
2845 -- are used to handle secondary dispatch tables. These entities have
2846 -- also the attribute Interface_Alias.
2848 -- Is_Interrupt_Handler
2849 -- Defined in procedures. Set if a pragma Interrupt_Handler applies
2850 -- to the procedure. The procedure must be a parameterless protected
2851 -- procedure.
2853 -- Is_Intrinsic_Subprogram
2854 -- Defined in functions and procedures. It is set if a valid pragma
2855 -- Interface or Import is present for this subprogram specifying
2856 -- convention Intrinsic. Valid means that the name and profile of the
2857 -- subprogram match the requirements of one of the recognized intrinsic
2858 -- subprograms (see package Sem_Intr for details). Note: the value of
2859 -- Convention for such an entity will be set to Convention_Intrinsic,
2860 -- but it is the setting of Is_Intrinsic_Subprogram, NOT simply having
2861 -- convention set to intrinsic, which causes intrinsic code to be
2862 -- generated.
2864 -- Is_Invariant_Procedure
2865 -- Defined in functions and procedures. Set for a generated invariant
2866 -- procedure which verifies the invariants of both the partial and full
2867 -- views of a private type or private extension as well as any inherited
2868 -- class-wide invariants from parent types or interfaces.
2870 -- Is_Itype
2871 -- Defined in all entities. Set to indicate that a type is an Itype,
2872 -- which means that the declaration for the type does not appear
2873 -- explicitly in the tree. Instead the backend will elaborate the type
2874 -- when it is first used. Has_Delayed_Freeze can be set for Itypes, and
2875 -- the meaning is that the first use (the one which causes the type to be
2876 -- defined) will be the freeze node. Note that an important restriction
2877 -- on Itypes is that the first use of such a type (the one that causes it
2878 -- to be defined) must be in the same scope as the type.
2880 -- Is_Known_Non_Null
2881 -- Defined in all entities. Relevant (and can be set) only for
2882 -- objects of an access type. It is set if the object is currently
2883 -- known to have a non-null value (meaning that no access checks
2884 -- are needed). The indication can for example come from assignment
2885 -- of an access parameter or an allocator whose value is known non-null.
2887 -- Note: this flag is set according to the sequential flow of the
2888 -- program, watching the current value of the variable. However, this
2889 -- processing can miss cases of changing the value of an aliased or
2890 -- constant object, so even if this flag is set, it should not be
2891 -- believed if the variable is aliased or volatile. It would be a
2892 -- little neater to avoid the flag being set in the first place in
2893 -- such cases, but that's trickier, and there is only one place that
2894 -- tests the value anyway.
2896 -- The flag is dynamically set and reset as semantic analysis and
2897 -- expansion proceeds. Its value is meaningless once the tree is
2898 -- fully constructed, since it simply indicates the last state.
2899 -- Thus this flag has no meaning to the backend.
2901 -- Is_Known_Null
2902 -- Defined in all entities. Relevant (and can be set ) only for
2903 -- objects of an access type. It is set if the object is currently known
2904 -- to have a null value (meaning that a dereference will surely raise
2905 -- constraint error exception). The indication can come from an
2906 -- assignment or object declaration.
2908 -- The comments above about sequential flow and aliased and volatile for
2909 -- the Is_Known_Non_Null flag apply equally to the Is_Known_Null flag.
2911 -- Is_Known_Valid
2912 -- Defined in all entities. Relevant for types (and subtype) and
2913 -- for objects (and enumeration literals) of a discrete type.
2915 -- The purpose of this flag is to implement the requirement stated
2916 -- in (RM 13.9.1(9-11)) which require that the use of possibly invalid
2917 -- values may not cause programs to become erroneous. See the function
2918 -- Checks.Expr_Known_Valid for further details. Note that the setting
2919 -- is conservative, in the sense that if the flag is set, it must be
2920 -- right. If the flag is not set, nothing is known about the validity.
2922 -- For enumeration literals, the flag is always set, since clearly
2923 -- an enumeration literal represents a valid value. Range checks
2924 -- where necessary will ensure that this valid value is appropriate.
2926 -- For objects, the flag indicates the state of knowledge about the
2927 -- current value of the object. This may be modified during expansion,
2928 -- and thus the final value is not relevant to the backend.
2930 -- For types and subtypes, the flag is set if all possible bit patterns
2931 -- of length Object_Size (i.e. Esize of the type) represent valid values
2932 -- of the type. In general for such types, all values are valid, the
2933 -- only exception being the case where an object of the type has an
2934 -- explicit size that is greater than Object_Size.
2936 -- For non-discrete objects, the setting of the Is_Known_Valid flag is
2937 -- not defined, and is not relevant, since the considerations of the
2938 -- requirement in (RM 13.9.1(9-11)) do not apply.
2940 -- The flag is dynamically set and reset as semantic analysis and
2941 -- expansion proceeds. Its value is meaningless once the tree is
2942 -- fully constructed, since it simply indicates the last state.
2943 -- Thus this flag has no meaning to the backend.
2945 -- Is_Limited_Composite
2946 -- Defined in all entities. Set for composite types that have a limited
2947 -- component. Used to enforce the rule that operations on the composite
2948 -- type that depend on the full view of the component do not become
2949 -- visible until the immediate scope of the composite type itself
2950 -- (RM 7.3.1 (5)).
2952 -- Is_Limited_Interface
2953 -- Defined in record types and subtypes. True for interface types, if
2954 -- interface is declared limited, task, protected, or synchronized, or
2955 -- is derived from a limited interface.
2957 -- Is_Limited_Record
2958 -- Defined in all entities. Set to true for record (sub)types if the
2959 -- record is declared to be limited. Note that this flag is not set
2960 -- simply because some components of the record are limited.
2962 -- Is_Local_Anonymous_Access
2963 -- Defined in access types. Set for an anonymous access type to indicate
2964 -- that the type is created for a record component with an access
2965 -- definition, an array component, or (pre-Ada 2012) a standalone object.
2966 -- Such anonymous types have an accessibility level equal to that of the
2967 -- declaration in which they appear, unlike the anonymous access types
2968 -- that are created for access parameters, access discriminants, and
2969 -- (as of Ada 2012) stand-alone objects.
2971 -- Is_Loop_Parameter
2972 -- Applies to all entities. Certain loops, in particular "for ... of"
2973 -- loops, get transformed so that the loop parameter is declared by a
2974 -- variable declaration, so the entity is an E_Variable. This is True for
2975 -- such E_Variables; False otherwise.
2977 -- Is_Machine_Code_Subprogram
2978 -- Defined in subprogram entities. Set to indicate that the subprogram
2979 -- is a machine code subprogram (i.e. its body includes at least one
2980 -- code statement). Also indicates that all necessary semantic checks
2981 -- as required by RM 13.8(3) have been performed.
2983 -- Is_Modular_Integer_Type (synthesized)
2984 -- Applies to all entities. True if entity is a modular integer type
2986 -- Is_Non_Static_Subtype
2987 -- Defined in all type and subtype entities. It is set in some (but not
2988 -- all) cases in which a subtype is known to be non-static. Before this
2989 -- flag was added, the computation of whether a subtype was static was
2990 -- entirely synthesized, by looking at the bounds, and the immediate
2991 -- subtype parent. However, this method does not work for some Itypes
2992 -- that have no parent set (and the only way to find the immediate
2993 -- subtype parent is to go through the tree). For now, this flag is set
2994 -- conservatively, i.e. if it is set then for sure the subtype is non-
2995 -- static, but if it is not set, then the type may or may not be static.
2996 -- Thus the test for a static subtype is that this flag is clear AND that
2997 -- the bounds are static AND that the parent subtype (if available to be
2998 -- tested) is static. Eventually we should make sure this flag is always
2999 -- set right, at which point, these comments can be removed, and the
3000 -- tests for static subtypes greatly simplified.
3002 -- Is_Null_Init_Proc
3003 -- Defined in procedure entities. Set for generated init proc procedures
3004 -- (used to initialize composite types), if the code for the procedure
3005 -- is null (i.e. is a return and nothing else). Such null initialization
3006 -- procedures are generated in case some client is compiled using the
3007 -- Initialize_Scalars pragma, generating a call to this null procedure,
3008 -- but there is no need to call such procedures within a compilation
3009 -- unit, and this flag is used to suppress such calls.
3011 -- Is_Null_State (synthesized)
3012 -- Applies to all entities, true for an abstract state declared with
3013 -- keyword null.
3015 -- Is_Numeric_Type (synthesized)
3016 -- Applies to all entities, true for all numeric types and subtypes
3017 -- (integer, fixed, float).
3019 -- Is_Object (synthesized)
3020 -- Applies to all entities, true for entities representing objects,
3021 -- including generic formal parameters.
3023 -- Is_Obsolescent
3024 -- Defined in all entities. Set for any entity to which a valid pragma
3025 -- or aspect Obsolescent applies.
3027 -- Is_Only_Out_Parameter
3028 -- Defined in formal parameter entities. Set if this parameter is the
3029 -- only OUT parameter for this formal part. If there is more than one
3030 -- out parameter, or if there is some other IN OUT parameter then this
3031 -- flag is not set in any of them. Used in generation of warnings.
3033 -- Is_Ordinary_Fixed_Point_Type (synthesized)
3034 -- Applies to all entities, true for ordinary fixed point types and
3035 -- subtypes.
3037 -- Is_Package_Body_Entity
3038 -- Defined in all entities. Set for entities defined at the top level
3039 -- of a package body. Used to control externally generated names.
3041 -- Is_Package_Or_Generic_Package (synthesized)
3042 -- Applies to all entities. True for packages and generic packages.
3043 -- False for all other entities.
3045 -- Is_Packed [implementation base type only]
3046 -- Defined in all type entities. This flag is set only for record and
3047 -- array types which have a packed representation. There are four cases
3048 -- which cause packing:
3050 -- 1. Explicit use of pragma Pack to pack a record.
3051 -- 2. Explicit use of pragma Pack to pack an array.
3052 -- 3. Setting Component_Size of an array to a packable value.
3053 -- 4. Indexing an array with a non-standard enumeration type.
3055 -- For records, Is_Packed is always set if Has_Pragma_Pack is set, and
3056 -- can also be set on its own in a derived type which inherited its
3057 -- packed status.
3059 -- For arrays, Is_Packed is set if either Has_Pragma_Pack is set and the
3060 -- component size is either not known at compile time or known but not
3061 -- 8/16/32/64 bits, or a Component_Size clause exists and the specified
3062 -- value is smaller than 64 bits but not 8/16/32, or if the array has one
3063 -- or more index types that are enumeration types with a non-standard
3064 -- representation (in GNAT, we store such arrays compactly, using the Pos
3065 -- of the enumeration type value). As for the case of records, Is_Packed
3066 -- can be set on its own for a derived type.
3068 -- Before an array type is frozen, Is_Packed will always be set if
3069 -- Has_Pragma_Pack is set. Before the freeze point, it is not possible
3070 -- to know the component size, since the component type is not frozen
3071 -- until the array type is frozen. Thus Is_Packed for an array type
3072 -- before it is frozen means that packed is required. Then if it turns
3073 -- out that the component size doesn't require packing, the Is_Packed
3074 -- flag gets turned off.
3076 -- In the bit-packed array case (i.e. the component size is known by the
3077 -- front end and is in the range 1-63 but not a multiple of 8), then the
3078 -- Is_Bit_Packed_Array flag will be set once the array type is frozen.
3080 -- Is_Packed_Array (synth)
3081 -- Applies to all entities, true if entity is for a packed array.
3083 -- Is_Packed_Array_Impl_Type
3084 -- Defined in all entities. This flag is set on the entity for the type
3085 -- used to implement a packed array (either a modular type or a subtype
3086 -- of Packed_Bytes{1,2,4} in the bit-packed array case, a regular array
3087 -- in the non-standard enumeration index case). It is set if and only
3088 -- if the type appears in the Packed_Array_Impl_Type field of some other
3089 -- entity. It is used by the back end to activate the special processing
3090 -- for such types (unchecked conversions that would not otherwise be
3091 -- allowed are allowed for such types). If Is_Packed_Array_Impl_Type is
3092 -- set in an entity, then the Original_Array_Type field of this entity
3093 -- points to the array type for which this is the Packed_Array_Impl_Type.
3095 -- Is_Param_Block_Component_Type [base type only]
3096 -- Defined in access types. Set to indicate that a type is the type of a
3097 -- component of the parameter block record type generated by the compiler
3098 -- for an entry or a select statement. Read by CodePeer.
3100 -- Is_Partial_Invariant_Procedure
3101 -- Defined in functions and procedures. Set for a generated invariant
3102 -- procedure which verifies the invariants of the partial view of a
3103 -- private type or private extension.
3105 -- Is_Potentially_Use_Visible
3106 -- Defined in all entities. Set if entity is potentially use visible,
3107 -- i.e. it is defined in a package that appears in a currently active
3108 -- use clause (RM 8.4(8)). Note that potentially use visible entities
3109 -- are not necessarily use visible (RM 8.4(9-11)).
3111 -- Is_Predicate_Function
3112 -- Present in functions and procedures. Set for generated predicate
3113 -- functions.
3115 -- Is_Preelaborated
3116 -- Defined in all entities, set in E_Package and E_Generic_Package
3117 -- entities to which a pragma Preelaborate is applied, and also in
3118 -- all entities within such packages. Note that the fact that this
3119 -- flag is set does not necessarily mean that no elaboration code is
3120 -- generated for the package.
3122 -- Is_Primitive
3123 -- Defined in overloadable entities and in generic subprograms. Set to
3124 -- indicate that this is a primitive operation of some type, which may
3125 -- be a tagged type or an untagged type. Used to verify overriding
3126 -- indicators in bodies.
3128 -- Is_Primitive_Wrapper
3129 -- Defined in functions and procedures created by the expander to serve
3130 -- as an indirection mechanism to overriding primitives of concurrent
3131 -- types, entries and protected procedures.
3133 -- Is_Prival (synthesized)
3134 -- Applies to all entities, true for renamings of private protected
3135 -- components. Such entities appear as constants or variables.
3137 -- Is_Private_Composite
3138 -- Defined in composite types that have a private component. Used to
3139 -- enforce the rule that operations on the composite type that depend
3140 -- on the full view of the component, do not become visible until the
3141 -- immediate scope of the composite type itself (7.3.1 (5)). Both this
3142 -- flag and Is_Limited_Composite are needed.
3144 -- Is_Private_Descendant
3145 -- Defined in entities that can represent library units (packages,
3146 -- functions, procedures). Set if the library unit is itself a private
3147 -- child unit, or if it is the descendant of a private child unit.
3149 -- Is_Private_Primitive
3150 -- Defined in subprograms. Set if the operation is a primitive of a
3151 -- tagged type (procedure or function dispatching on result) whose
3152 -- full view has not been seen. Used in particular for primitive
3153 -- subprograms of a synchronized type declared between the two views
3154 -- of the type, so that the wrapper built for such a subprogram can
3155 -- be given the proper signature.
3157 -- Is_Private_Type (synthesized)
3158 -- Applies to all entities, true for private types and subtypes,
3159 -- as well as for record with private types as subtypes.
3161 -- Is_Protected_Component (synthesized)
3162 -- Applicable to all entities, true if the entity denotes a private
3163 -- component of a protected type.
3165 -- Is_Protected_Interface (synthesized)
3166 -- Defined in types that are interfaces. True if interface is declared
3167 -- protected, or is derived from protected interfaces.
3169 -- Is_Protected_Record_Type (synthesized)
3170 -- Applies to all entities, true if Is_Concurrent_Record_Type is true and
3171 -- Corresponding_Concurrent_Type is a protected type.
3173 -- Is_Protected_Type (synthesized)
3174 -- Applies to all entities, true for protected types and subtypes
3176 -- Is_Public
3177 -- Defined in all entities. Set to indicate that an entity defined in
3178 -- one compilation unit can be referenced from other compilation units.
3179 -- If this reference causes a reference in the generated code, for
3180 -- example in the case of a variable name, then the backend will generate
3181 -- an appropriate external name for use by the linker.
3183 -- Is_Pure
3184 -- Defined in all entities. Set in all entities of a unit to which a
3185 -- pragma Pure is applied except for non-intrinsic imported subprograms,
3186 -- and also set for the entity of the unit itself. In addition, this
3187 -- flag may be set for any other functions or procedures that are known
3188 -- to be side effect free, so in the case of subprograms, the Is_Pure
3189 -- flag may be used by the optimizer to imply that it can assume freedom
3190 -- from side effects (other than those resulting from assignment to Out
3191 -- or In Out parameters, or to objects designated by access parameters).
3193 -- Is_Pure_Unit_Access_Type
3194 -- Defined in access type and subtype entities. Set if the type or
3195 -- subtype appears in a pure unit. Used to give an error message at
3196 -- freeze time if the access type has a storage pool.
3198 -- Is_RACW_Stub_Type
3199 -- Defined in all types, true for the stub types generated for remote
3200 -- access-to-class-wide types.
3202 -- Is_Raised
3203 -- Defined in exception entities. Set if the entity is referenced by a
3204 -- a raise statement.
3206 -- Is_Real_Type (synthesized)
3207 -- Applies to all entities, true for real types and subtypes
3209 -- Is_Record_Type (synthesized)
3210 -- Applies to all entities, true for record types and subtypes,
3211 -- includes class-wide types and subtypes (which are also records).
3213 -- Is_Relaxed_Initialization_State (synthesized)
3214 -- Applies to all entities, true for abstract states that are subject to
3215 -- option Relaxed_Initialization.
3217 -- Is_Remote_Call_Interface
3218 -- Defined in all entities. Set in E_Package and E_Generic_Package
3219 -- entities to which a pragma Remote_Call_Interface is applied, and
3220 -- also on entities declared in the visible part of such a package.
3222 -- Is_Remote_Types
3223 -- Defined in all entities. Set in E_Package and E_Generic_Package
3224 -- entities to which a pragma Remote_Types is applied, and also on
3225 -- entities declared in the visible part of the spec of such a package.
3226 -- Also set for types which are generic formal types to which the
3227 -- pragma Remote_Access_Type applies.
3229 -- Is_Renaming_Of_Object
3230 -- Defined in all entities, set only for a variable or constant for
3231 -- which the Renamed_Object field is non-empty and for which the
3232 -- renaming is handled by the front end, by macro substitution of
3233 -- a copy of the (evaluated) name tree wherever the variable is used.
3235 -- Is_Return_Object
3236 -- Defined in all object entities. True if the object is the return
3237 -- object of an extended_return_statement; False otherwise.
3239 -- Is_Safe_To_Reevaluate
3240 -- Defined in all entities. Set in variables that are initialized by
3241 -- means of an assignment statement. When initialized their contents
3242 -- never change and hence they can be seen by the backend as constants.
3243 -- See also Is_True_Constant.
3245 -- Is_Scalar_Type (synthesized)
3246 -- Applies to all entities, true for scalar types and subtypes
3248 -- Is_Shared_Passive
3249 -- Defined in all entities. Set in E_Package and E_Generic_Package
3250 -- entities to which a pragma Shared_Passive is applied, and also in
3251 -- all entities within such packages.
3253 -- Is_Standard_Character_Type (synthesized)
3254 -- Applies to all entities, true for types and subtypes whose root type
3255 -- is one of the standard character types (Character, Wide_Character, or
3256 -- Wide_Wide_Character).
3258 -- Is_Standard_String_Type (synthesized)
3259 -- Applies to all entities, true for types and subtypes whose root
3260 -- type is one of the standard string types (String, Wide_String, or
3261 -- Wide_Wide_String).
3263 -- Is_Static_Type
3264 -- Defined in entities. Only set for (sub)types. If set, indicates that
3265 -- the type is known to be a static type (defined as a discrete type with
3266 -- static bounds, a record all of whose component types are static types,
3267 -- or an array, all of whose bounds are of a static type, and also have
3268 -- a component type that is a static type). See Set_Uplevel_Type for more
3269 -- information on how this flag is used.
3271 -- Is_Statically_Allocated
3272 -- Defined in all entities. This can only be set for exception,
3273 -- variable, constant, and type/subtype entities. If the flag is set,
3274 -- then the variable or constant must be allocated statically rather
3275 -- than on the local stack frame. For exceptions, the meaning is that
3276 -- the exception data should be allocated statically (and indeed this
3277 -- flag is always set for exceptions, since exceptions do not have
3278 -- local scope). For a type, the meaning is that the type must be
3279 -- elaborated at the global level rather than locally. No type marked
3280 -- with this flag may depend on a local variable, or on any other type
3281 -- which does not also have this flag set to True. For a variable or
3282 -- or constant, if the flag is set, then the type of the object must
3283 -- either be declared at the library level, or it must also have the
3284 -- flag set (since to allocate the object statically, its type must
3285 -- also be elaborated globally).
3287 -- Is_String_Type (synthesized)
3288 -- Applies to all type entities. Determines if the given type is a
3289 -- string type, i.e. it is directly a string type or string subtype,
3290 -- or a string slice type, or an array type with one dimension and a
3291 -- component type that is a character type.
3293 -- Is_Subprogram (synthesized)
3294 -- Applies to all entities, true for function, procedure and operator
3295 -- entities.
3297 -- Is_Subprogram_Or_Generic_Subprogram
3298 -- Applies to all entities, true for function procedure and operator
3299 -- entities, and also for the corresponding generic entities.
3301 -- Is_Synchronized_Interface (synthesized)
3302 -- Defined in types that are interfaces. True if interface is declared
3303 -- synchronized, task, or protected, or is derived from a synchronized
3304 -- interface.
3306 -- Is_Synchronized_State (synthesized)
3307 -- Applies to all entities, true for abstract states that are subject to
3308 -- option Synchronous.
3310 -- Is_Tag
3311 -- Defined in E_Component and E_Constant entities. For regular tagged
3312 -- type this flag is set on the tag component (whose name is Name_uTag).
3313 -- For CPP_Class tagged types, this flag marks the pointer to the main
3314 -- vtable (i.e. the one to be extended by derivation).
3316 -- Is_Tagged_Type
3317 -- Defined in all entities, set for an entity that is a tagged type
3319 -- Is_Task_Interface (synthesized)
3320 -- Defined in types that are interfaces. True if interface is declared as
3321 -- a task interface, or if it is derived from task interfaces.
3323 -- Is_Task_Record_Type (synthesized)
3324 -- Applies to all entities, true if Is_Concurrent_Record_Type is true and
3325 -- Corresponding_Concurrent_Type is a task type.
3327 -- Is_Task_Type (synthesized)
3328 -- Applies to all entities. True for task types and subtypes
3330 -- Is_Thunk
3331 -- Defined in all entities. True for subprograms that are thunks, that is
3332 -- small subprograms built by the expander for particular tagged types.
3333 -- There are two different kinds of thunk: interface thunk and secondary
3334 -- stack thunk. Interface thunks are built for tagged types that cover
3335 -- interface types. As part of the runtime call to an interface, they
3336 -- displace the pointer to the object (pointer named "this" in the C++
3337 -- terminology) from a secondary dispatch table to the primary dispatch
3338 -- table associated with a given tagged type; if the thunk is a function
3339 -- that returns an object which covers an interface type then the thunk
3340 -- displaces the pointer to the object from the primary dispatch table to
3341 -- the secondary dispatch table associated with the interface type.
3343 -- Secondary stack thunks are built for tagged types that do not need to
3344 -- be returned on the secondary stack but have primitive functions which
3345 -- can dispatch on result. In this case, dispatching calls made to these
3346 -- primitive functions nevertheless need to return on the secondary stack
3347 -- and a thunk is built to move the result from the primary stack onto
3348 -- the secondary stack on return from the primitive function. The flag
3349 -- Has_Controlling_Result is set on secondary stack thunks but not on
3350 -- interface thunks.
3352 -- Thunks may be chained in a single way: an interface thunk may point to
3353 -- a secondary stack thunk, which points to the final thunk target.
3355 -- Is_Trivial_Subprogram
3356 -- Defined in all entities. Set in subprograms where either the body
3357 -- consists of a single null statement, or the first or only statement
3358 -- of the body raises an exception. This is used for suppressing certain
3359 -- warnings, see Sem_Ch6.Analyze_Subprogram_Body discussion for details.
3361 -- Is_True_Constant
3362 -- Defined in all entities for constants and variables. Set in constants
3363 -- and variables which have an initial value specified but which are
3364 -- never assigned, partially or in the whole. For variables, it means
3365 -- that the variable was initialized but never modified, and hence can be
3366 -- treated as a constant by the code generator. For a constant, it means
3367 -- that the constant was not modified by generated code (e.g. to set a
3368 -- discriminant in an init proc). Assignments by user or generated code
3369 -- will reset this flag. See also Is_Safe_To_Reevaluate.
3371 -- Is_Type (synthesized)
3372 -- Applies to all entities, true for a type entity
3374 -- Is_Unchecked_Union [implementation base type only]
3375 -- Defined in all entities. Set only in record types to which the
3376 -- pragma Unchecked_Union has been validly applied.
3378 -- Is_Underlying_Full_View
3379 -- Defined in all entities. Set for types which represent the true full
3380 -- view of a private type completed by another private type. For further
3381 -- details, see attribute Underlying_Full_View.
3383 -- Is_Underlying_Record_View [base type only]
3384 -- Defined in all entities. Set only in record types that represent the
3385 -- underlying record view. This view is built for derivations of types
3386 -- with unknown discriminants; it is a record with the same structure
3387 -- as its corresponding record type, but whose parent is the full view
3388 -- of the parent in the original type extension.
3390 -- Is_Unimplemented
3391 -- Defined in all entities. Set for any entity to which a valid pragma
3392 -- or aspect Unimplemented applies.
3394 -- Is_Unsigned_Type
3395 -- Defined in all types, but can be set only for discrete and fixed-point
3396 -- type and subtype entities. This flag is only valid if the entity is
3397 -- frozen. If set it indicates that the representation is known to be
3398 -- unsigned (i.e. that no negative values appear in the range). This is
3399 -- normally just a reflection of the lower bound of the subtype or base
3400 -- type, but there is one case in which the setting is not obvious,
3401 -- namely the case of an unsigned subtype of a signed type from which
3402 -- a further subtype is obtained using variable bounds. This further
3403 -- subtype is still unsigned, but this cannot be determined by looking
3404 -- at its bounds or the bounds of the corresponding base type.
3405 -- For a subtype indication whose range is statically a null range,
3406 -- the flag is set if the lower bound is non-negative, but the flag
3407 -- cannot be used to determine the comparison operator to emit in the
3408 -- generated code: use the base type.
3410 -- Is_Uplevel_Referenced_Entity
3411 -- Defined in all entities. Used when unnesting subprograms to indicate
3412 -- that an entity is locally defined within a subprogram P, and there is
3413 -- a reference to the entity within a subprogram nested within P (at any
3414 -- depth). Set for uplevel referenced objects (variables, constants,
3415 -- discriminants and loop parameters), and also for upreferenced dynamic
3416 -- types, including the cases where the reference is implicit (e.g. the
3417 -- type of an array used for computing the location of an element in an
3418 -- array. This is used internally in Exp_Unst, see this package for
3419 -- further details.
3421 -- Is_Valued_Procedure
3422 -- Defined in procedure entities. Set if an Import_Valued_Procedure
3423 -- or Export_Valued_Procedure pragma applies to the procedure entity.
3425 -- Is_Visible_Formal
3426 -- Defined in all entities. Set for instances of the formals of a
3427 -- formal package. Indicates that the entity must be made visible in the
3428 -- body of the instance, to reproduce the visibility of the generic.
3429 -- This simplifies visibility settings in instance bodies.
3431 -- Is_Visible_Lib_Unit
3432 -- Defined in all (root or child) library unit entities. Once compiled,
3433 -- library units remain chained to the entities in the parent scope, and
3434 -- a separate flag must be used to indicate whether the names are visible
3435 -- by selected notation, or not.
3437 -- Is_Volatile
3438 -- Defined in all type entities, and also in constants, components and
3439 -- variables. Set if a pragma Volatile applies to the entity. Also set
3440 -- if pragma Shared or pragma Atomic applies to entity. In the case of
3441 -- private or incomplete types, this flag is set in both the private
3442 -- and full view. The flag is not set reliably on private subtypes,
3443 -- and is always retrieved from the base type (but this is not a base-
3444 -- type-only attribute because it applies to other entities). Note that
3445 -- the backend should use Treat_As_Volatile, rather than Is_Volatile
3446 -- to indicate code generation requirements for volatile variables.
3447 -- Similarly, any front end test which is concerned with suppressing
3448 -- optimizations on volatile objects should test Treat_As_Volatile
3449 -- rather than testing this flag.
3450 -- This is a synthesized attribute in Einfo.Utils, based on
3451 -- Is_Volatile_Type and Is_Volatile_Object. The latter two should be
3452 -- used in preference to Is_Volatile when we know that we have a type
3453 -- or an object.
3455 -- Is_Volatile_Full_Access
3456 -- Defined in all type entities, and also in constants, components, and
3457 -- variables. Set if an aspect/pragma Volatile_Full_Access or an Ada 2022
3458 -- aspect Full_Access_Only applies to the entity. In the case of private
3459 -- and incomplete types, this flag is set in both the partial view and
3460 -- the full view.
3462 -- Is_Wrapper_Package (synthesized)
3463 -- Defined in package entities. Indicates that the package has been
3464 -- created as a wrapper for a subprogram instantiation.
3466 -- Is_Wrapper
3467 -- Defined in subprogram entities. Indicates that it has been created as
3468 -- a wrapper to handle inherited class-wide pre/post conditions that call
3469 -- overridden primitives or as a wrapper of a controlling function.
3471 -- Itype_Printed
3472 -- Defined in all type and subtype entities. Set in Itypes if the Itype
3473 -- has been printed by Sprint. This is used to avoid printing an Itype
3474 -- more than once.
3476 -- Kill_Elaboration_Checks
3477 -- Defined in all entities. Set by the expander to kill elaboration
3478 -- checks which are known not to be needed. Equivalent in effect to
3479 -- the use of pragma Suppress (Elaboration_Checks) for that entity
3480 -- except that the effect is permanent and cannot be undone by a
3481 -- subsequent pragma Unsuppress.
3483 -- Kill_Range_Checks
3484 -- Defined in all entities. Equivalent in effect to the use of pragma
3485 -- Suppress (Range_Checks) for that entity except that the result is
3486 -- permanent and cannot be undone by a subsequent pragma Unsuppress.
3487 -- This is currently only used in one odd situation in Sem_Ch3 for
3488 -- record types, and it would be good to get rid of it???
3490 -- Known_To_Have_Preelab_Init
3491 -- Defined in all type and subtype entities. If set, then the type is
3492 -- known to have preelaborable initialization. In the case of a partial
3493 -- view of a private type, it is only possible for this to be set if a
3494 -- pragma Preelaborable_Initialization is given for the type. For other
3495 -- types, it is never set if the type does not have preelaborable
3496 -- initialization, it may or may not be set if the type does have
3497 -- preelaborable initialization.
3499 -- Last_Aggregate_Assignment
3500 -- Applies to controlled constants and variables initialized by an
3501 -- aggregate. Points to the last statement associated with the expansion
3502 -- of the aggregate. The attribute is used by the finalization machinery
3503 -- when marking an object as successfully initialized.
3505 -- Last_Assignment
3506 -- Defined in entities for variables, and OUT or IN OUT formals. Set for
3507 -- a local variable or formal to point to the left side of an assignment
3508 -- statement assigning a value to the variable. Cleared if the value of
3509 -- the entity is referenced. Used to warn about dubious assignment
3510 -- statements whose value is not used.
3512 -- Last_Entity
3513 -- Defined in all entities which act as scopes to which a list of
3514 -- associated entities is attached (blocks, class subtypes and types,
3515 -- entries, functions, loops, packages, procedures, protected objects,
3516 -- record types and subtypes, private types, task types and subtypes).
3517 -- Points to the last entry in the list of associated entities chained
3518 -- through the Next_Entity field. Empty if no entities are chained.
3520 -- Last_Formal (synthesized)
3521 -- Applies to subprograms and subprogram types, and also in entries
3522 -- and entry families. Returns last formal of the subprogram or entry.
3523 -- The formals are the first entities declared in a subprogram or in
3524 -- a subprogram type (the designated type of an Access_To_Subprogram
3525 -- definition) or in an entry.
3527 -- Limited_View
3528 -- Defined in non-generic package entities that are not instances. Bona
3529 -- fide package with the limited-view list through the first_entity and
3530 -- first_private attributes. The elements of this list are the shadow
3531 -- entities created for the types and local packages that are declared
3532 -- in a package appearing in a limited_with clause (Ada 2005: AI-50217).
3534 -- Linker_Section_Pragma
3535 -- Present in constant, variable, type and subprogram entities. Points
3536 -- to a linker section pragma that applies to the entity, or is Empty if
3537 -- no such pragma applies. Note that for constants and variables, this
3538 -- field may be set as a result of a linker section pragma applied to the
3539 -- type of the object.
3541 -- Lit_Hash
3542 -- Defined in enumeration types and subtypes. Non-empty only for the
3543 -- case of an enumeration root type, where it contains the entity for
3544 -- the generated hash function. See unit Exp_Imgv for full details of
3545 -- the nature and use of this entity for implementing the Value
3546 -- attribute for the enumeration type in question.
3548 -- Lit_Indexes
3549 -- Defined in enumeration types and subtypes. Non-empty only for the
3550 -- case of an enumeration root type, where it contains the entity for
3551 -- the generated indexes entity. See unit Exp_Imgv for full details of
3552 -- the nature and use of this entity for implementing the Image and
3553 -- Value attributes for the enumeration type in question.
3555 -- Lit_Strings
3556 -- Defined in enumeration types and subtypes. Non-empty only for the
3557 -- case of an enumeration root type, where it contains the entity for
3558 -- the literals string entity. See unit Exp_Imgv for full details of
3559 -- the nature and use of this entity for implementing the Image and
3560 -- Value attributes for the enumeration type in question.
3562 -- Low_Bound_Tested
3563 -- Defined in all entities. Currently this can only be set for formal
3564 -- parameter entries of a standard unconstrained one-dimensional array
3565 -- or string type. Indicates that an explicit test of the low bound of
3566 -- the formal appeared in the code, e.g. in a pragma Assert. If this
3567 -- flag is set, warnings about assuming the index low bound to be one
3568 -- are suppressed.
3570 -- Machine_Radix_10
3571 -- Defined in decimal types and subtypes, set if the Machine_Radix is 10,
3572 -- as the result of the specification of a machine radix representation
3573 -- clause. Note that it is possible for this flag to be set without
3574 -- having Has_Machine_Radix_Clause True. This happens when a type is
3575 -- derived from a type with a clause present.
3577 -- Master_Id
3578 -- Defined in access types and subtypes. Empty unless Has_Task is set for
3579 -- the designated type, in which case it points to the entity for the
3580 -- Master_Id for the access type master. Also set for access-to-limited-
3581 -- class-wide types whose root may be extended with task components, and
3582 -- for access-to-limited-interfaces because they can be used to reference
3583 -- tasks implementing such interface.
3585 -- Materialize_Entity
3586 -- Defined in all entities. Set only for renamed obects which should be
3587 -- materialized for debugging purposes. This means that a memory location
3588 -- containing the renamed address should be allocated. This is needed so
3589 -- that the debugger can find the entity.
3591 -- May_Inherit_Delayed_Rep_Aspects
3592 -- Defined in all entities for types and subtypes. Set if the type is
3593 -- derived from a type which has delayed rep aspects (marked by the flag
3594 -- Has_Delayed_Rep_Aspects being set). In this case, at the freeze point
3595 -- for the derived type we know that the parent type is frozen, and if
3596 -- a given attribute has not been set for the derived type, we copy the
3597 -- value from the parent type. See Freeze.Inherit_Delayed_Rep_Aspects.
3599 -- Mechanism (returned as Mechanism_Type)
3600 -- Defined in functions and non-generic formal parameters. Indicates
3601 -- the mechanism to be used for the function return or for the formal
3602 -- parameter. See full description in the spec of Sem_Mech. This field
3603 -- is also set (to the default value of zero = Default_Mechanism) in a
3604 -- subprogram body entity but not used in this context.
3606 -- Minimum_Accessibility
3607 -- Defined in formal parameters in the non-generic case. Normally Empty,
3608 -- but if expansion is active, and a parameter exists for which a
3609 -- dynamic accessibility check is required, then an object is generated
3610 -- within such a subprogram representing the accessibility level of the
3611 -- subprogram or the formal's Extra_Accessibility - whichever one is
3612 -- lesser. The Minimum_Accessibility field then points to this object.
3614 -- Modulus [base type only]
3615 -- Defined in modular types. Contains the modulus. For the binary case,
3616 -- this will be a power of 2, but if Non_Binary_Modulus is set, then it
3617 -- will not be a power of 2.
3619 -- Must_Be_On_Byte_Boundary
3620 -- Defined in entities for types and subtypes. Set if objects of the type
3621 -- must always be allocated on a byte boundary (more accurately a storage
3622 -- unit boundary). The front end checks that component clauses respect
3623 -- this rule, and the backend ensures that record packing does not
3624 -- violate this rule. Currently the flag is set only for packed arrays
3625 -- longer than 64 bits where the component size is not a power of 2.
3627 -- Must_Have_Preelab_Init
3628 -- Defined in entities for types and subtypes. Set in the full type of a
3629 -- private type or subtype if a pragma Has_Preelaborable_Initialization
3630 -- is present for the private type. Used to check that the full type has
3631 -- preelaborable initialization at freeze time (this has to be deferred
3632 -- to the freeze point because of the rule about overriding Initialize).
3634 -- Needs_Activation_Record
3635 -- Defined on generated subprogram types. Indicates that a call through
3636 -- a named or anonymous access to subprogram requires an activation
3637 -- record when compiling with unnesting for C or LLVM.
3639 -- Needs_Debug_Info
3640 -- Defined in all entities. Set if the entity requires normal debugging
3641 -- information to be generated. This is true of all entities that have
3642 -- Comes_From_Source set, and also transitively for entities associated
3643 -- with such components (e.g. their types). It is true for all entities
3644 -- in Debug_Generated_Code mode (-gnatD switch). This is the flag that
3645 -- the backend should check to determine whether or not to generate
3646 -- debugging information for an entity. Note that callers should always
3647 -- use Sem_Util.Set_Debug_Info_Needed, rather than Set_Needs_Debug_Info,
3648 -- so that the flag is set properly on subsidiary entities.
3650 -- Needs_No_Actuals
3651 -- Defined in callable entities (subprograms, entries, access to
3652 -- subprograms) which can be called without actuals because all of
3653 -- their formals (if any) have default values. This flag simplifies the
3654 -- resolution of the syntactic ambiguity involving a call to these
3655 -- entities when the return type is an array type, and a call can be
3656 -- interpreted as an indexing of the result of the call. It is also
3657 -- used to resolve various cases of entry calls.
3659 -- Never_Set_In_Source
3660 -- Defined in all entities, but can be set only for variables and
3661 -- parameters. This flag is set if the object is never assigned a value
3662 -- in user source code, either by assignment or by being used as an out
3663 -- or in out parameter. Note that this flag is not reset from using an
3664 -- initial value, so if you want to test for this case as well, test the
3665 -- Has_Initial_Value flag also.
3667 -- This flag is only for the purposes of issuing warnings, it must not
3668 -- be used by the code generator to indicate that the variable is in
3669 -- fact a constant, since some assignments in generated code do not
3670 -- count (for example, the call to an init proc to assign some but
3671 -- not all of the fields in a partially initialized record). The code
3672 -- generator should instead use the flag Is_True_Constant.
3674 -- For the purposes of this warning, the default assignment of access
3675 -- variables to null is not considered the assignment of a value (so
3676 -- the warning can be given for code that relies on this initial null
3677 -- value when no other value is ever set).
3679 -- In variables and out parameters, if this flag is set after full
3680 -- processing of the corresponding declarative unit, it indicates that
3681 -- the variable or parameter was never set, and a warning message can
3682 -- be issued.
3684 -- Note: this flag is initially set, and then cleared on encountering
3685 -- any construct that might conceivably legitimately set the value.
3686 -- Thus during the analysis of a declarative region and its associated
3687 -- statement sequence, the meaning of the flag is "not set yet", and
3688 -- once this analysis is complete the flag means "never assigned".
3690 -- Note: for variables appearing in package declarations, this flag is
3691 -- never set. That is because there is no way to tell if some client
3692 -- modifies the variable (or, in the case of variables in the private
3693 -- part, if some child unit modifies the variables).
3695 -- Note: in the case of renamed objects, the flag must be set in the
3696 -- ultimate renamed object. Clients noting a possible modification
3697 -- should use the Note_Possible_Modification procedure in Sem_Util
3698 -- rather than Set_Never_Set_In_Source precisely to deal properly with
3699 -- the renaming possibility.
3701 -- Next_Component (synthesized)
3702 -- Applies to record components. Returns the next component by following
3703 -- the chain of declared entities until one is found which corresponds to
3704 -- a component (Ekind is E_Component). Any internal types generated from
3705 -- the subtype indications of the record components are skipped. Returns
3706 -- Empty if no more components.
3708 -- Next_Component_Or_Discriminant (synthesized)
3709 -- Similar to Next_Component, but includes components and discriminants
3710 -- so the input can have either E_Component or E_Discriminant, and the
3711 -- same is true for the result. Returns Empty if no more components or
3712 -- discriminants in the record.
3714 -- Next_Discriminant (synthesized)
3715 -- Applies to discriminants returned by First/Next_Discriminant. Returns
3716 -- the next language-defined (i.e. perhaps non-stored) discriminant by
3717 -- following the chain of declared entities as long as the kind of the
3718 -- entity corresponds to a discriminant. Note that the discriminants
3719 -- might be the only components of the record. Returns Empty if there
3720 -- are no more discriminants.
3722 -- Next_Entity
3723 -- Defined in all entities. The entities of a scope are chained, with
3724 -- the head of the list being in the First_Entity field of the scope
3725 -- entity. All entities use the Next_Entity field as a forward pointer
3726 -- for this list, with Empty indicating the end of the list. Since this
3727 -- field is in the base part of the entity, the access routines for this
3728 -- field are in Sinfo.
3730 -- Next_Formal (synthesized)
3731 -- Applies to the entity for a formal parameter. Returns the next formal
3732 -- parameter of the subprogram or subprogram type. Returns Empty if there
3733 -- are no more formals.
3735 -- Next_Formal_With_Extras (synthesized)
3736 -- Applies to the entity for a formal parameter. Returns the next
3737 -- formal parameter of the subprogram or subprogram type. Returns
3738 -- Empty if there are no more formals. The list returned includes
3739 -- all the extra formals (see description of Extra_Formal field)
3741 -- Next_Index (synthesized)
3742 -- Applies to array types and subtypes and to string types and
3743 -- subtypes. Yields the next index. The first index is obtained by
3744 -- using the First_Index attribute, and then subsequent indexes are
3745 -- obtained by applying Next_Index to the previous index. Empty is
3746 -- returned to indicate that there are no more indexes. Note that
3747 -- unlike most attributes in this package, Next_Index applies to
3748 -- nodes for the indexes, not to entities.
3750 -- Next_Inlined_Subprogram
3751 -- Defined in subprograms. Used to chain inlined subprograms used in
3752 -- the current compilation, in the order in which they must be compiled
3753 -- by the backend to ensure that all inlinings are performed.
3755 -- Next_Literal (synthesized)
3756 -- Applies to enumeration literals, returns the next literal, or
3757 -- Empty if applied to the last literal. This is actually a synonym
3758 -- for Next, but its use is preferred in this context.
3760 -- No_Dynamic_Predicate_On_Actual
3761 -- Defined in discrete types. Set for generic formal types that are used
3762 -- in loops and quantified expressions. The corresponding actual cannot
3763 -- have dynamic predicates.
3765 -- No_Pool_Assigned [root type only]
3766 -- Defined in access types. Set if a storage size clause applies to the
3767 -- variable with a static expression value of zero. This flag is used to
3768 -- generate errors if any attempt is made to allocate or free an instance
3769 -- of such an access type. This is set only in the root type, since
3770 -- derived types must have the same pool.
3772 -- No_Predicate_On_Actual
3773 -- Defined in discrete types. Set for generic formal types that are used
3774 -- in the spec of a generic package, in constructs that forbid discrete
3775 -- types with predicates.
3777 -- No_Reordering [implementation base type only]
3778 -- Defined in record types. Set only for a base type to which a valid
3779 -- pragma No_Component_Reordering applies.
3781 -- No_Return
3782 -- Defined in all entities. Set for subprograms and generic subprograms
3783 -- to which a valid aspect or pragma No_Return applies.
3785 -- No_Strict_Aliasing [base type only]
3786 -- Defined in access types. Set to direct the backend to avoid any
3787 -- optimizations based on an assumption about the aliasing status of
3788 -- objects designated by the access type. For the case of the gcc
3789 -- backend, the effect is as though all references to objects of
3790 -- the type were compiled with -fno-strict-aliasing. This flag is
3791 -- set if an unchecked conversion with the access type as a target
3792 -- type occurs in the same source unit as the declaration of the
3793 -- access type, or if an explicit pragma No_Strict_Aliasing applies.
3795 -- No_Tagged_Streams_Pragma
3796 -- Present in all subtype and type entities. Set for tagged types and
3797 -- subtypes (i.e. entities with Is_Tagged_Type set True) if a valid
3798 -- pragma/aspect applies to the type.
3800 -- Non_Binary_Modulus [base type only]
3801 -- Defined in all subtype and type entities. Set for modular integer
3802 -- types if the modulus value is other than a power of 2.
3804 -- Non_Limited_View
3805 -- Defined in abstract states and incomplete types that act as shadow
3806 -- entities created when analysing a limited with clause (Ada 2005:
3807 -- AI-50217). Points to the defining entity of the original declaration.
3809 -- Nonzero_Is_True [base type only]
3810 -- Defined in enumeration types. Set if any non-zero value is to be
3811 -- interpreted as true. Currently this is set for derived Boolean
3812 -- types which have a convention of C, C++ or Fortran.
3814 -- Normalized_First_Bit
3815 -- Defined in components and discriminants. Indicates the normalized
3816 -- value of First_Bit for the component, i.e. the offset within the
3817 -- lowest addressed storage unit containing part or all of the field.
3818 -- Set to No_Uint if no first bit position is assigned yet.
3820 -- Normalized_Position
3821 -- Defined in components and discriminants. Indicates the normalized
3822 -- value of Position for the component, i.e. the offset in storage
3823 -- units from the start of the record to the lowest addressed storage
3824 -- unit containing part or all of the field.
3826 -- Number_Dimensions (synthesized)
3827 -- Applies to array types and subtypes. Returns the number of dimensions
3828 -- of the array type or subtype as a value of type Pos.
3830 -- Number_Entries (synthesized)
3831 -- Applies to concurrent types. Returns the number of entries that are
3832 -- declared within the task or protected definition for the type.
3834 -- Number_Formals (synthesized)
3835 -- Applies to subprograms and subprogram types. Yields the number of
3836 -- formals as a value of type Pos.
3838 -- Object_Size_Clause (synthesized)
3839 -- Applies to entities for types and subtypes. If an object size clause
3840 -- is present in the rep item chain for an entity then the attribute
3841 -- definition clause node is returned. Otherwise Object_Size_Clause
3842 -- returns Empty if no item is present. Usually this is only meaningful
3843 -- if the flag Has_Object_Size_Clause is set. This is because when the
3844 -- representation item chain is copied for a derived type, it can inherit
3845 -- an object size clause that is not applicable to the entity.
3847 -- OK_To_Rename
3848 -- Defined only in entities for variables. If this flag is set, it
3849 -- means that if the entity is used as the initial value of an object
3850 -- declaration, the object declaration can be safely converted into a
3851 -- renaming to avoid an extra copy. This is set for variables which are
3852 -- generated by the expander to hold the result of evaluating some
3853 -- expression. Most notably, the local variables used to store the result
3854 -- of concatenations are so marked (see Exp_Ch4.Expand_Concatenate). It
3855 -- is only worth setting this flag for composites, since for primitive
3856 -- types, it is cheaper to do the copy.
3858 -- Optimize_Alignment_Space
3859 -- Defined in type, subtype, variable, and constant entities. This
3860 -- flag records that the type or object is to be laid out in a manner
3861 -- consistent with Optimize_Alignment (Space) mode. The compiler and
3862 -- binder ensure a consistent view of any given type or object. If pragma
3863 -- Optimize_Alignment (Off) mode applies to the type/object, then neither
3864 -- of the flags Optimize_Alignment_Space/Optimize_Alignment_Time is set.
3866 -- Optimize_Alignment_Time
3867 -- Defined in type, subtype, variable, and constant entities. This
3868 -- flag records that the type or object is to be laid out in a manner
3869 -- consistent with Optimize_Alignment (Time) mode. The compiler and
3870 -- binder ensure a consistent view of any given type or object. If pragma
3871 -- Optimize_Alignment (Off) mode applies to the type/object, then neither
3872 -- of the flags Optimize_Alignment_Space/Optimize_Alignment_Time is set.
3874 -- Original_Access_Type
3875 -- Defined in E_Access_Subprogram_Type entities. Set only if the access
3876 -- type was generated by the expander as part of processing an access-
3877 -- to-protected-subprogram type. Points to the access-to-protected-
3878 -- subprogram type.
3880 -- Original_Array_Type
3881 -- Defined in modular types and array types and subtypes. Set only if
3882 -- the Is_Packed_Array_Impl_Type flag is set, indicating that the type
3883 -- is the implementation type for a packed array, and in this case it
3884 -- points to the original array type for which this is the packed
3885 -- array implementation type.
3887 -- Original_Protected_Subprogram
3888 -- Defined in functions and procedures. Set only on internally built
3889 -- dispatching subprograms of protected types to reference their original
3890 -- non-dispatching protected subprogram since their names differ.
3892 -- Original_Record_Component
3893 -- Defined in components, including discriminants. The usage depends
3894 -- on whether the record is a base type and whether it is tagged.
3896 -- In base tagged types:
3897 -- When the component is inherited in a record extension, it points
3898 -- to the original component (the entity of the ancestor component
3899 -- which is not itself inherited) otherwise it points to itself. The
3900 -- backend uses this attribute to implement the automatic dereference
3901 -- in the extension and to apply the transformation:
3903 -- Rec_Ext.Comp -> Rec_Ext.Parent. ... .Parent.Comp
3905 -- In base untagged types:
3906 -- Always points to itself except for non-stored discriminants, where
3907 -- it points to the stored discriminant it renames.
3909 -- In subtypes (tagged and untagged):
3910 -- Points to the component in the base type.
3912 -- Overlays_Constant
3913 -- Defined in all entities. Set only for E_Constant or E_Variable for
3914 -- which there is an address clause that causes the entity to overlay
3915 -- a constant object.
3917 -- Overridden_Operation
3918 -- Defined in subprograms. For overriding operations, points to the
3919 -- user-defined parent subprogram that is being overridden. Note: this
3920 -- attribute uses the same field as Static_Initialization. The latter
3921 -- is only defined for internal initialization procedures, for which
3922 -- Overridden_Operation is irrelevant. Thus this attribute must not be
3923 -- set for init_procs.
3925 -- Package_Instantiation
3926 -- Defined in packages and generic packages. When defined, this field
3927 -- references an N_Generic_Instantiation node associated with an
3928 -- instantiated package. In the case where the referenced node has
3929 -- been rewritten to an N_Package_Specification, the instantiation
3930 -- node is available from the Original_Node field of the package spec
3931 -- node. This is currently not guaranteed to be set in all cases, but
3932 -- when set, the field is used in Get_Unit_Instantiation_Node as
3933 -- one of the means of obtaining the instantiation node. Eventually
3934 -- it should be set in all cases, including package entities associated
3935 -- with formal packages. ???
3937 -- Packed_Array_Impl_Type
3938 -- Defined in array types and subtypes, except for the string literal
3939 -- subtype case, if the corresponding type is packed and implemented
3940 -- specially (either bit-packed or packed to eliminate holes in the
3941 -- non-contiguous enumeration index types). References the type used to
3942 -- represent the packed array, which is either a modular type for short
3943 -- static arrays or an array of System.Unsigned in the bit-packed case,
3944 -- or a regular array in the non-standard enumeration index case. Note
3945 -- that in some situations (internal types and references to fields of
3946 -- variant records), it is not always possible to construct this type in
3947 -- advance of its use. If this field is empty, then the necessary type
3948 -- is declared on the fly for each reference to the array.
3950 -- Parameter_Mode (synthesized)
3951 -- Applies to formal parameter entities. This is a synonym for Ekind,
3952 -- used when obtaining the formal kind of a formal parameter (the result
3953 -- is one of E_[In/Out/In_Out]_Parameter).
3955 -- Parent_Subtype [base type only]
3956 -- Defined in E_Record_Type. Set only for derived tagged types, in which
3957 -- case it points to the subtype of the parent type. This is the type
3958 -- that is used as the Etype of the _parent field.
3960 -- Part_Of_Constituents
3961 -- Present in abstract state and variable entities. Contains all
3962 -- constituents that are subject to indicator Part_Of (both aspect and
3963 -- option variants).
3965 -- Part_Of_References
3966 -- Present in variable entities. Contains all references to the variable
3967 -- when it is subject to pragma Part_Of. If the variable is a constituent
3968 -- of a single protected/task type, the references are examined as they
3969 -- must appear only within the type definition and the corresponding
3970 -- body.
3972 -- Partial_DIC_Procedure (synthesized)
3973 -- Defined in type entities. Set for a private type and its full view
3974 -- when the type is subject to pragma Default_Initial_Condition (DIC), or
3975 -- when the type inherits a DIC pragma from a parent type. Points to the
3976 -- entity of a procedure that takes a single argument of the given type
3977 -- and verifies the assertion expression of the DIC pragma at run time.
3978 -- When present, the Partial_DIC_Procedure of a type only checks DICs
3979 -- associated with the partial (private) view of the type, and is invoked
3980 -- by the full DIC_Procedure (which may check additional DICs associated
3981 -- with the full view).
3983 -- Note: the reason this is marked as a synthesized attribute is that the
3984 -- way this is stored is as an element of the Subprograms_For_Type field.
3986 -- Partial_Invariant_Procedure (synthesized)
3987 -- Defined in types and subtypes. Set for private types when one or more
3988 -- [class-wide] type invariants apply to them. Points to the entity for a
3989 -- procedure which checks the invariant. This invariant procedure takes a
3990 -- single argument of the given type, and returns if the invariant holds,
3991 -- or raises exception Assertion_Error with an appropriate message if it
3992 -- does not hold. This attribute is defined but always Empty for private
3993 -- subtypes. This attribute is also set for the corresponding full type.
3995 -- Note: the reason this is marked as a synthesized attribute is that the
3996 -- way this is stored is as an element of the Subprograms_For_Type field.
3998 -- Partial_Refinement_Constituents (synthesized)
3999 -- Defined in abstract state entities. Returns the constituents that
4000 -- refine the state in the current scope, which are allowed in a global
4001 -- refinement in this scope. These consist of those constituents that are
4002 -- abstract states with no or only partial refinement visible, and those
4003 -- that are not themselves abstract states.
4005 -- Partial_View_Has_Unknown_Discr
4006 -- Present in all types. Set to Indicate that the partial view of a type
4007 -- has unknown discriminants. A default initialization of an object of
4008 -- the type does not require an invariant check (AI12-0133).
4010 -- Pending_Access_Types
4011 -- Defined in all types. Set for incomplete, private, Taft-amendment
4012 -- types, and their corresponding full views. This list contains all
4013 -- access types, both named and anonymous, declared between the partial
4014 -- and the full view. The list is used by the finalization machinery to
4015 -- ensure that the finalization masters of all pending access types are
4016 -- fully initialized when the full view is frozen.
4018 -- Postconditions_Proc
4019 -- Obsolete field which can be removed once CodePeer is fixed ???
4021 -- Predicate_Function (synthesized)
4022 -- Defined in all types. Set for types for which (Has_Predicates is True)
4023 -- and for which a predicate procedure has been built that tests that the
4024 -- specified predicates are True. Contains the entity for the function
4025 -- which takes a single argument of the given type (and sometimes an
4026 -- additional Boolean parameter), and returns True if the predicate
4027 -- holds and False if it does not.
4029 -- Note: flag Has_Predicate does not imply that Predicate_Function is set
4030 -- to a non-empty entity; this happens, for example, for itypes created
4031 -- when instantiating generic units with private types with predicates.
4032 -- However, if an explicit pragma Predicate or Predicate aspect is given
4033 -- either for private or full type declaration then both Has_Predicates
4034 -- and a non-empty Predicate_Function will be set on both the partial and
4035 -- full views of the type.
4037 -- Note: the reason this is marked as a synthesized attribute is that the
4038 -- way this is stored is as an element of the Subprograms_For_Type field.
4040 -- Predicate_Expression
4041 -- Defined on functions. For the defining identifier of the subprogram
4042 -- declaration (not of the subprogram body) of a predicate function,
4043 -- yields the expression for the noninherited portion of the given
4044 -- predicate (except in the case where the inherited portion is
4045 -- non-empty and the non-inherited portion is empty, in which case the
4046 -- expression for the inherited portion is returned). Otherwise yields
4047 -- empty.
4049 -- Predicated_Parent
4050 -- Defined on itypes created by subtype indications, when the parent
4051 -- subtype has predicates. The itype shares the Predicate_Function
4052 -- of the predicated parent, but this function may not have been built
4053 -- at the point the Itype is constructed, so this attribute allows its
4054 -- retrieval at the point a predicate check needs to be generated.
4055 -- The utility Predicate_Function takes this link into account.
4057 -- Predicates_Ignored
4058 -- Defined on all types. Indicates whether the subtype declaration is in
4059 -- a context where Assertion_Policy is Ignore, in which case no checks
4060 -- (static or dynamic) must be generated for objects of the type.
4062 -- Prev_Entity
4063 -- Defined in all entities. The entities of a scope are chained, and this
4064 -- field is used as a backward pointer for this entity list - effectively
4065 -- making the entity chain doubly-linked.
4067 -- Primitive_Operations (synthesized)
4068 -- Defined in concurrent types, tagged record types and subtypes, tagged
4069 -- private types and tagged incomplete types. For concurrent types whose
4070 -- Corresponding_Record_Type (CRT) is available, returns the list of
4071 -- Direct_Primitive_Operations of its CRT; otherwise returns No_Elist.
4072 -- For all the other types returns the Direct_Primitive_Operations.
4074 -- Prival
4075 -- Defined in private components of protected types. Refers to the entity
4076 -- of the component renaming declaration generated inside protected
4077 -- subprograms, entries or barrier functions.
4079 -- Prival_Link
4080 -- Defined in constants and variables which rename private components of
4081 -- protected types. Set to the original private component.
4083 -- Private_Dependents
4084 -- Defined in private (sub)types. Records the subtypes of the private
4085 -- type, derivations from it, and records and arrays with components
4086 -- dependent on the type.
4088 -- The subtypes are traversed when installing and deinstalling (the full
4089 -- view of) a private type in order to ensure correct view of the
4090 -- subtypes.
4092 -- Used in similar fashion for incomplete types: holds list of subtypes
4093 -- of these incomplete types that have discriminant constraints. The
4094 -- full views of these subtypes are constructed when the full view of
4095 -- the incomplete type is processed.
4097 -- In addition, if the incomplete type is the designated type in an
4098 -- access definition for an access parameter, the operation may be
4099 -- a dispatching primitive operation, which is only known when the full
4100 -- declaration of the type is seen. Subprograms that have such an
4101 -- access parameter are also placed in the list of private_dependents.
4103 -- Protected_Body_Subprogram
4104 -- Defined in protected operations. References the entity for the
4105 -- subprogram which implements the body of the operation.
4107 -- Protected_Formal
4108 -- Defined in formal parameters (in, in out and out parameters). Used
4109 -- only for formals of protected operations. References corresponding
4110 -- formal parameter in the unprotected version of the operation that
4111 -- is created during expansion.
4113 -- Protected_Subprogram
4114 -- Defined in functions and procedures. Set for the pair of subprograms
4115 -- which emulate the runtime semantics of a protected subprogram. Denotes
4116 -- the entity of the origial protected subprogram.
4118 -- Protection_Object
4119 -- Applies to protected entries, entry families and subprograms. Denotes
4120 -- the entity which is used to rename the _object component of protected
4121 -- types.
4123 -- Reachable
4124 -- Defined in labels. The flag is set over the range of statements in
4125 -- which a goto to that label is legal.
4127 -- Receiving_Entry
4128 -- Defined in procedures. Set for an internally generated procedure which
4129 -- wraps the original statements of an accept alternative. Designates the
4130 -- entity of the task entry being accepted.
4132 -- Referenced
4133 -- Defined in all entities. Set if the entity is referenced, except for
4134 -- the case of an appearance of a simple variable that is not a renaming
4135 -- as the left side of an assignment in which case Referenced_As_LHS is
4136 -- set instead, or a similar appearance as an out parameter actual, in
4137 -- which case Referenced_As_Out_Parameter is set.
4139 -- Referenced_As_LHS
4140 -- Defined in all entities. This flag is set instead of Referenced if a
4141 -- simple variable that is not a renaming appears as the left side of an
4142 -- assignment. The reason we distinguish this kind of reference is that
4143 -- we have a separate warning for variables that are only assigned and
4144 -- never read.
4146 -- Referenced_As_Out_Parameter
4147 -- Defined in all entities. This flag is set instead of Referenced if a
4148 -- simple variable that is not a renaming appears as an actual for an out
4149 -- formal. The reason we distinguish this kind of reference is that
4150 -- we have a separate warning for variables that are only assigned and
4151 -- never read, and out parameters are a special case.
4153 -- Refinement_Constituents
4154 -- Present in abstract state entities. Contains all the constituents that
4155 -- refine the state, in other words, all the hidden states that appear in
4156 -- the constituent_list of aspect/pragma Refined_State.
4158 -- Register_Exception_Call
4159 -- Defined in exception entities. When an exception is declared,
4160 -- a call is expanded to Register_Exception. This field points to
4161 -- the expanded N_Procedure_Call_Statement node for this call. It
4162 -- is used for Import/Export_Exception processing to modify the
4163 -- register call to make appropriate entries in the special tables
4164 -- used for handling these pragmas at run time.
4166 -- Related_Array_Object
4167 -- Defined in array types and subtypes. Used only for the base type
4168 -- and subtype created for an anonymous array object. Set to point
4169 -- to the entity of the corresponding array object. Currently used
4170 -- only for type-related error messages.
4172 -- Related_Expression
4173 -- Defined in variables, types and functions. When Set for internally
4174 -- generated entities, it may be used to denote the source expression
4175 -- whose elaboration created the variable declaration. If set, it is used
4176 -- for generating clearer messages from CodePeer. It is used on source
4177 -- entities that are variables in iterator specifications, to provide
4178 -- a link to the container that is the domain of iteration. This allows
4179 -- for better cross-reference information when the loop modifies elements
4180 -- of the container, and suppresses spurious warnings.
4181 -- Finally this node is used on functions specified via the Real_Literal
4182 -- aspect, to denote the 2-parameter overloading, if found.
4184 -- Shouldn't it also be used for the same purpose in errout? It seems
4185 -- odd to have two mechanisms here???
4187 -- Related_Instance
4188 -- Defined in the wrapper packages created for subprogram instances.
4189 -- The internal subprogram that implements the instance is inside the
4190 -- wrapper package, but for debugging purposes its external symbol
4191 -- must correspond to the name and scope of the related instance.
4193 -- Related_Type
4194 -- Defined in components, constants and variables. Set when there is an
4195 -- associated dispatch table to point to entities containing primary or
4196 -- secondary tags. Not set in the _tag component of record types.
4198 -- Relative_Deadline_Variable [implementation base type only]
4199 -- Defined in task type entities. This flag is set if a valid and
4200 -- effective pragma Relative_Deadline applies to the base type. Points
4201 -- to the entity for a variable that is created to hold the value given
4202 -- in a Relative_Deadline pragma for a task type.
4204 -- Renamed_Entity
4205 -- Defined in exception, generic unit, package, and subprogram entities.
4206 -- Set when the entity is defined by a renaming declaration. Denotes the
4207 -- renamed entity, or transitively the ultimate renamed entity if there
4208 -- is a chain of renaming declarations. Empty if no renaming.
4210 -- Renamed_In_Spec
4211 -- Defined in package entities. If a package renaming occurs within
4212 -- a package spec, then this flag is set on the renamed package. The
4213 -- purpose is to prevent a warning about unused entities in the renamed
4214 -- package. Such a warning would be inappropriate since clients of the
4215 -- package can see the entities in the package via the renaming.
4217 -- Renamed_Object
4218 -- Defined in components, constants, discriminants, formal parameters,
4219 -- generic formals, loop parameters, and variables. Set to non-Empty if
4220 -- the object was declared by a renaming declaration. For constants and
4221 -- variables, the attribute references the tree node for the name of the
4222 -- renamed object. For formal parameters, the field is used in inlining
4223 -- and maps the entities of all formal parameters of a subprogram to the
4224 -- entities of the corresponding actuals. For formals of a task entry,
4225 -- the attribute denotes the local renaming that replaces the actual
4226 -- within an accept statement. For all remaining cases (discriminants,
4227 -- loop parameters) the field is Empty.
4229 -- Requires_Overriding
4230 -- Defined in all subprograms and entries. Set for subprograms that
4231 -- require overriding as defined by RM-2005-3.9.3(6/2). Note that this
4232 -- is True only for implicitly declared subprograms; it is not set on the
4233 -- parent type's subprogram. See also Is_Abstract_Subprogram.
4235 -- Return_Applies_To
4236 -- Defined in E_Return_Statement. Points to the entity representing
4237 -- the construct to which the return statement applies, as defined in
4238 -- RM-6.5(4/2). Note that a (simple) return statement within an
4239 -- extended_return_statement applies to the extended_return_statement,
4240 -- even though it causes the whole function to return.
4241 -- Also defined in special E_Block entities built as E_Return_Statement
4242 -- for extended return statements and attached to the block statement
4243 -- by Expand_N_Extended_Return_Statement before being turned into an
4244 -- E_Block by semantic analysis.
4246 -- Return_Present
4247 -- Defined in function and generic function entities. Set if the
4248 -- function contains a return statement (used for error checking).
4249 -- This flag can also be set in procedure and generic procedure
4250 -- entities (for convenience in setting it), but is only tested
4251 -- for the function case.
4253 -- Return_Statement
4254 -- Defined in E_Variable. Set when Is_Return_Object is set, in which
4255 -- case it points to the N_Simple_Return_Statement made from the
4256 -- extended return statement.
4258 -- Returns_By_Ref
4259 -- Defined in subprogram type entities and functions. Set if a function
4260 -- (or an access-to-function type) returns a result by reference, either
4261 -- because the result is built in place, or its type is by-reference.
4263 -- Reverse_Bit_Order [base type only]
4264 -- Defined in all record type entities. Set if entity has a Bit_Order
4265 -- aspect (set by an aspect clause or attribute definition clause) that
4266 -- has reversed the order of bits from the default value. When this flag
4267 -- is set, a component clause must specify a set of bits entirely within
4268 -- a single storage unit (Ada 95) or within a single machine scalar (see
4269 -- Ada 2005 AI-133), or must occupy an integral number of storage units.
4271 -- Reverse_Storage_Order [base type only]
4272 -- Defined in all record and array type entities. Set if entity has a
4273 -- Scalar_Storage_Order aspect (set by an aspect clause or attribute
4274 -- definition clause) that has reversed the order of storage elements
4275 -- from the default value. When this flag is set for a record type,
4276 -- the Bit_Order aspect must be set to the same value (either explicitly
4277 -- or as the target default value).
4279 -- Rewritten_For_C
4280 -- Defined on functions that return a constrained array type, when
4281 -- Modify_Tree_For_C is set. Indicates that a procedure with an extra
4282 -- out parameter has been created for it, and calls must be rewritten as
4283 -- calls to the new procedure.
4285 -- RM_Size
4286 -- Defined in all type and subtype entities. Contains the value of
4287 -- type'Size as defined in the RM. See also the Esize field and
4288 -- and the description on "Handling of Type'Size Values". A value
4289 -- of zero in this field for a non-discrete type means that
4290 -- the front end has not yet determined the size value. For the
4291 -- case of a discrete type, this field is always set by the front
4292 -- end and zero is a legitimate value for a type with one value.
4294 -- Root_Type (synthesized)
4295 -- Applies to all type entities. For class-wide types, returns the root
4296 -- type of the class covered by the CW type, otherwise returns the
4297 -- ultimate derivation ancestor of the given type. This function
4298 -- preserves the view, i.e. the Root_Type of a partial view is the
4299 -- partial view of the ultimate ancestor, the Root_Type of a full view
4300 -- is the full view of the ultimate ancestor. Note that this function
4301 -- does not correspond exactly to the use of root type in the RM, since
4302 -- in the RM root type applies to a class of types, not to a type.
4304 -- Scalar_Range
4305 -- Defined in all scalar types (including modular types, where the
4306 -- bounds are 0 .. modulus - 1). References a node in the tree that
4307 -- contains the bounds for the range. Note that this information
4308 -- could be obtained by rummaging around the tree, but it is more
4309 -- convenient to have it immediately at hand in the entity. The
4310 -- contents of Scalar_Range can either be an N_Subtype_Indication
4311 -- node (with a constraint), a Range node, or an Integer_Type_Definition,
4312 -- but not a simple subtype reference (a subtype is converted into a
4313 -- explicit range).
4315 -- Scale_Value
4316 -- Defined in decimal fixed-point types and subtypes. This holds the
4317 -- value of the Scale attribute for the type, i.e. the scale of the type
4318 -- defined as the integer N such that the delta is equal to 10.0**(-N).
4319 -- Note that, if Scale_Value is positive, then it is equal to Aft_Value.
4321 -- Scope
4322 -- Defined in all entities. Points to the entity for the scope (block,
4323 -- loop, subprogram, package etc.) in which the entity is declared.
4324 -- Since this field is in the base part of the entity node, the access
4325 -- routines for this field are in Sinfo. Note that for a child unit,
4326 -- the Scope will be the parent package, and for a root library unit,
4327 -- the Scope will be Standard.
4329 -- Scope_Depth (synthesized)
4330 -- Applies to program units, blocks, loops, return statements,
4331 -- concurrent types, private types and entries, and also to record types,
4332 -- i.e. to any entity that can appear on the scope stack. Yields the
4333 -- scope depth value, which for those entities other than records is
4334 -- simply the scope depth value, for record entities, it is the
4335 -- Scope_Depth of the record scope.
4337 -- Scope_Depth_Value
4338 -- Defined in program units, blocks, loops, return statements,
4339 -- concurrent types, private types and entries.
4340 -- Indicates the number of scopes that statically enclose the declaration
4341 -- of the unit or type. Library units have a depth of zero. Note that
4342 -- record types can act as scopes but do NOT have this field set (see
4343 -- Scope_Depth above). Queries should normally be via Scope_Depth,
4344 -- and not call Scope_Depth_Value directly.
4346 -- Scope_Depth_Set (synthesized)
4347 -- Applies to a special predicate function that returns a Boolean value
4348 -- indicating whether or not the Scope_Depth field has been set. It is
4349 -- needed, since returns an invalid value in this case.
4351 -- Sec_Stack_Needed_For_Return
4352 -- Defined in scope entities (blocks, entries, entry families, functions,
4353 -- and procedures). Set to True when secondary stack is used to hold the
4354 -- returned value of a function and thus should not be released on scope
4355 -- exit.
4357 -- Shared_Var_Procs_Instance
4358 -- Defined in variables. Set non-Empty only if Is_Shared_Passive is
4359 -- set, in which case this is the entity for the associated instance of
4360 -- System.Shared_Storage.Shared_Var_Procs. See Exp_Smem for full details.
4362 -- Size_Check_Code
4363 -- Defined in constants and variables. Normally Empty. Set if code is
4364 -- generated to check the size of the object. This field is used to
4365 -- suppress this code if a subsequent address clause is encountered.
4367 -- Size_Clause (synthesized)
4368 -- Applies to all entities. If a size or value size clause is present in
4369 -- the rep item chain for an entity then that attribute definition clause
4370 -- is returned. Otherwise Size_Clause returns Empty. Usually this is only
4371 -- meaningful if the flag Has_Size_Clause is set. This is because when
4372 -- the representation item chain is copied for a derived type, it can
4373 -- inherit a size clause that is not applicable to the entity.
4375 -- Size_Depends_On_Discriminant
4376 -- Defined in all entities for types and subtypes. Indicates that the
4377 -- size of the type depends on the value of one or more discriminants.
4378 -- Currently, this flag is only set for arrays which have one or more
4379 -- bounds depending on a discriminant value.
4381 -- Size_Known_At_Compile_Time
4382 -- Defined in all entities for types and subtypes. Indicates that the
4383 -- size of objects of the type is known at compile time. This flag is
4384 -- used to optimize some generated code sequences, and also to enable
4385 -- some error checks (e.g. disallowing component clauses on variable
4386 -- length objects). It is set conservatively (i.e. if it is True, the
4387 -- size is certainly known at compile time, if it is False, then the
4388 -- size may or may not be known at compile time, but the code will
4389 -- assume that it is not known). Note that the value may be known only
4390 -- to the back end, so the fact that this flag is set does not mean that
4391 -- the front end can access the value.
4393 -- Small_Value
4394 -- Defined in fixed point types. Points to the universal real for the
4395 -- Small of the type, either as given in a representation clause, or
4396 -- as computed (as a power of two) by the compiler.
4398 -- SPARK_Aux_Pragma
4399 -- Present in concurrent type, [generic] package spec and package body
4400 -- entities. For concurrent types and package specs it refers to the
4401 -- SPARK mode setting for the private part. This field points to the
4402 -- N_Pragma node that either appears in the private part or is inherited
4403 -- from the enclosing context. For package bodies, it refers to the SPARK
4404 -- mode of the elaboration sequence after the BEGIN. The fields points to
4405 -- the N_Pragma node that either appears in the statement sequence or is
4406 -- inherited from the enclosing context. In all cases, if the pragma is
4407 -- inherited, then the SPARK_Aux_Pragma_Inherited flag is set.
4409 -- SPARK_Aux_Pragma_Inherited
4410 -- Present in concurrent type, [generic] package spec and package body
4411 -- entities. Set if the SPARK_Aux_Pragma field points to a pragma that is
4412 -- inherited, rather than a local one.
4414 -- SPARK_Pragma
4415 -- Present in the following entities:
4417 -- abstract states
4418 -- constants
4419 -- entries
4420 -- operators
4421 -- [generic] packages
4422 -- package bodies
4423 -- [generic] subprograms
4424 -- subprogram bodies
4425 -- variables
4426 -- types
4428 -- Points to the N_Pragma node that applies to the initial declaration or
4429 -- body. This is either set by a local SPARK_Mode pragma or is inherited
4430 -- from the context (from an outer scope for the spec case or from the
4431 -- spec for the body case). In the case where the attribute is inherited,
4432 -- flag SPARK_Pragma_Inherited is set. Empty if no SPARK_Mode pragma is
4433 -- applicable.
4435 -- SPARK_Pragma_Inherited
4436 -- Present in the following entities:
4438 -- abstract states
4439 -- constants
4440 -- entries
4441 -- operators
4442 -- [generic] packages
4443 -- package bodies
4444 -- [generic] subprograms
4445 -- subprogram bodies
4446 -- variables
4447 -- types
4449 -- Set if the SPARK_Pragma attribute points to an inherited pragma rather
4450 -- than a local one.
4452 -- Spec_Entity
4453 -- Defined in package body entities. Points to corresponding package
4454 -- spec entity. Also defined in subprogram body parameters in the
4455 -- case where there is a separate spec, where this field references
4456 -- the corresponding parameter entities in the spec.
4458 -- SSO_Set_High_By_Default [base type only]
4459 -- Defined for record and array types. Set in the base type if a pragma
4460 -- Default_Scalar_Storage_Order (High_Order_First) was active at the time
4461 -- the record or array was declared and therefore applies to it.
4463 -- SSO_Set_Low_By_Default [base type only]
4464 -- Defined for record and array types. Set in the base type if a pragma
4465 -- Default_Scalar_Storage_Order (High_Order_First) was active at the time
4466 -- the record or array was declared and therefore applies to it.
4468 -- Static_Call_Helper
4469 -- Defined on subprogram entities. Set if the subprogram has class-wide
4470 -- preconditions. Denotes the helper that evaluates at runtime the
4471 -- class-wide preconditions performing static calls.
4473 -- Static_Discrete_Predicate
4474 -- Defined in discrete types/subtypes with static predicates (with the
4475 -- two flags Has_Predicates and Has_Static_Predicate set). Set if the
4476 -- type/subtype has a static predicate. Points to a list of expression
4477 -- and N_Range nodes that represent the predicate in canonical form. The
4478 -- canonical form has entries sorted in ascending order, with duplicates
4479 -- eliminated, and adjacent ranges coalesced, so that there is always a
4480 -- gap in the values between successive entries. The entries in this list
4481 -- are fully analyzed and typed with the base type of the subtype. Note
4482 -- that all entries are static and have values within the subtype range.
4484 -- Static_Elaboration_Desired
4485 -- Defined in library-level packages. Set by the pragma of the same
4486 -- name, to indicate that static initialization must be attempted for
4487 -- all types declared in the package, and that a warning must be emitted
4488 -- for those types to which static initialization is not available.
4490 -- Static_Initialization
4491 -- Defined in initialization procedures for types whose objects can be
4492 -- initialized statically. The value of this attribute is a positional
4493 -- aggregate whose components are compile-time static values. Used
4494 -- when available in object declarations to eliminate the call to the
4495 -- initialization procedure, and to minimize elaboration code. Note:
4496 -- This attribute uses the same field as Overridden_Operation, which is
4497 -- irrelevant in init_procs.
4499 -- Static_Real_Or_String_Predicate
4500 -- Defined in real types/subtypes with static predicates (with the two
4501 -- flags Has_Predicates and Has_Static_Predicate set). Set if the type
4502 -- or subtype has a static predicate. Points to the return expression
4503 -- of the predicate function. This is the original expression given as
4504 -- the predicate except that occurrences of the type are replaced by
4505 -- occurrences of the formal parameter of the predicate function (note
4506 -- that the spec of this function including this formal parameter name
4507 -- is available from the Subprograms_For_Type field; it can be accessed
4508 -- as Predicate_Function (typ)). Also, in the case where a predicate is
4509 -- inherited, the expression is of the form:
4511 -- xxxPredicate (typ2 (ent)) AND THEN expression
4513 -- where typ2 is the type from which the predicate is inherited, ent is
4514 -- the entity for the current predicate function, and xxxPredicate is the
4515 -- inherited predicate (from typ2). Finally for a predicate that inherits
4516 -- from another predicate but does not add a predicate of its own, the
4517 -- expression may consist of the above xxxPredicate call on its own.
4519 -- Status_Flag_Or_Transient_Decl
4520 -- Defined in constant, loop, and variable entities. Applies to objects
4521 -- that require special treatment by the finalization machinery, such as
4522 -- extended return results, IF and CASE expression results, and objects
4523 -- inside N_Expression_With_Actions nodes. The attribute contains the
4524 -- entity of a flag which specifies particular behavior over a region of
4525 -- code or the declaration of a "hook" object.
4526 -- In which case is it a flag, or a hook object???
4528 -- Storage_Size_Variable [implementation base type only]
4529 -- Defined in access types and task type entities. This flag is set
4530 -- if a valid and effective pragma Storage_Size applies to the base
4531 -- type. Points to the entity for a variable that is created to
4532 -- hold the value given in a Storage_Size pragma for an access
4533 -- collection or a task type. Note that in the access type case,
4534 -- this field is defined only in the root type (since derived types
4535 -- share the same storage pool).
4537 -- Stored_Constraint
4538 -- Defined in entities that can have discriminants (concurrent types
4539 -- subtypes, record types and subtypes, private types and subtypes,
4540 -- limited private types and subtypes and incomplete types). Points
4541 -- to an element list containing the expressions for each of the
4542 -- stored discriminants for the record (sub)type.
4544 -- Stores_Attribute_Old_Prefix
4545 -- Defined in constants, variables, and types which are created during
4546 -- expansion in order to save the value of attribute 'Old's prefix.
4548 -- Strict_Alignment [implementation base type only]
4549 -- Defined in all type entities. Indicates that the type is by-reference
4550 -- or contains an aliased part. This forbids packing a component of this
4551 -- type tighter than the alignment and size of the type, as specified by
4552 -- RM 13.2(7) modified by AI12-001 as a Binding Interpretation.
4554 -- String_Literal_Length
4555 -- Defined in string literal subtypes (which are created to correspond
4556 -- to string literals in the program). Contains the length of the string
4557 -- literal.
4559 -- String_Literal_Low_Bound
4560 -- Defined in string literal subtypes (which are created to correspond
4561 -- to string literals in the program). Contains an expression whose
4562 -- value represents the low bound of the literal. This is a copy of
4563 -- the low bound of the applicable index constraint if there is one,
4564 -- or a copy of the low bound of the index base type if not.
4566 -- Subprograms_For_Type
4567 -- Defined in all types. The list may contain the entities of the default
4568 -- initial condition procedure, invariant procedure, and the two versions
4569 -- of the predicate function.
4571 -- Historical note: This attribute used to be a direct linked list of
4572 -- entities rather than an Elist. The Elist allows greater flexibility
4573 -- in inheritance of subprograms between views of the same type.
4575 -- Subps_Index
4576 -- Present in subprogram entities. Set if the subprogram contains nested
4577 -- subprograms, or is a subprogram nested within such a subprogram. Holds
4578 -- the index in the Exp_Unst.Subps table for the subprogram. Note that
4579 -- for the outer level subprogram, this is the starting index in the Subp
4580 -- table for the entries for this subprogram.
4582 -- Suppress_Elaboration_Warnings
4583 -- NOTE: this flag is relevant only for the legacy ABE mechanism and
4584 -- should not be used outside of that context.
4586 -- Defined in all entities, can be set only for subprogram entities and
4587 -- for variables. If this flag is set then Sem_Elab will not generate
4588 -- elaboration warnings for the subprogram or variable. Suppression of
4589 -- such warnings is automatic for subprograms for which elaboration
4590 -- checks are suppressed (without the need to set this flag), but the
4591 -- flag is also set for various internal entities (such as init procs)
4592 -- which are known not to generate any possible access before elaboration
4593 -- and it is set on variables when a warning is given to avoid multiple
4594 -- elaboration warnings for the same variable.
4596 -- Suppress_Initialization
4597 -- Defined in all variable, type and subtype entities. If set for a base
4598 -- type, then the generation of initialization procedures is suppressed
4599 -- for the type. Any other implicit initialization (e.g. from the use of
4600 -- pragma Initialize_Scalars) is also suppressed if this flag is set for
4601 -- either the subtype in question, or for the base type. For variables,
4602 -- this flag suppresses all implicit initialization for the object, even
4603 -- if the type would normally require initialization. Set by use of
4604 -- pragma Suppress_Initialization and also for internal entities where
4605 -- we know that no initialization is required. For example, enumeration
4606 -- image table entities set it.
4608 -- Suppress_Style_Checks
4609 -- Defined in all entities. Suppresses any style checks specifically
4610 -- associated with the given entity if set.
4612 -- Suppress_Value_Tracking_On_Call
4613 -- Defined in all entities. Set in a scope entity if value tracking is to
4614 -- be suppressed on any call within the scope. Used when an access to a
4615 -- local subprogram is computed, to deal with the possibility that this
4616 -- value may be passed around, and if used, may clobber a local variable.
4618 -- Task_Body_Procedure
4619 -- Defined in task types and subtypes. Points to the entity for the task
4620 -- task body procedure (as further described in Exp_Ch9, task bodies are
4621 -- expanded into procedures). A convenient function to retrieve this
4622 -- field is Sem_Util.Get_Task_Body_Procedure.
4624 -- The last sentence is odd??? Why not have Task_Body_Procedure go to the
4625 -- Underlying_Type of the Root_Type???
4627 -- Thunk_Entity
4628 -- Defined in functions and procedures which have been classified as
4629 -- Is_Thunk. Set to the target entity called by the thunk.
4631 -- Treat_As_Volatile
4632 -- Defined in all type entities, and also in constants, components and
4633 -- variables. Set if this entity is to be treated as volatile for code
4634 -- generation purposes. Always set if Is_Volatile is set, but can also
4635 -- be set as a result of situations (such as address overlays) where
4636 -- the front end wishes to force volatile handling to inhibit aliasing
4637 -- optimization which might be legally ok, but is undesirable. Note
4638 -- that the backend always tests this flag rather than Is_Volatile.
4639 -- The front end tests Is_Volatile if it is concerned with legality
4640 -- checks associated with declared volatile variables, but if the test
4641 -- is for the purposes of suppressing optimizations, then the front
4642 -- end should test Treat_As_Volatile rather than Is_Volatile.
4644 -- Note: before testing Treat_As_Volatile, consider whether it would
4645 -- be more appropriate to use Exp_Util.Is_Volatile_Reference instead,
4646 -- which catches more cases of volatile references.
4648 -- Type_High_Bound (synthesized)
4649 -- Applies to scalar types. Returns the tree node (Node_Id) that contains
4650 -- the high bound of a scalar type. The returned value is literal for a
4651 -- base type, but may be an expression in the case of scalar type with
4652 -- dynamic bounds.
4654 -- Type_Low_Bound (synthesized)
4655 -- Applies to scalar types. Returns the tree node (Node_Id) that contains
4656 -- the low bound of a scalar type. The returned value is literal for a
4657 -- base type, but may be an expression in the case of scalar type with
4658 -- dynamic bounds.
4660 -- Underlying_Full_View
4661 -- Defined in private subtypes that are the completion of other private
4662 -- types, or in private types that are derived from private subtypes. If
4663 -- the full view of a private type T is derived from another private type
4664 -- with discriminants Td, the full view of T is also private, and there
4665 -- is no way to attach to it a further full view that would convey the
4666 -- structure of T to the backend. The Underlying_Full_View is an
4667 -- attribute of the full view that is a subtype of Td with the same
4668 -- constraint as the declaration for T. The declaration for this subtype
4669 -- is built at the point of the declaration of T, either as completion,
4670 -- or as a subtype declaration where the base type is private and has a
4671 -- private completion. If Td is already constrained, then its full view
4672 -- can serve directly as the full view of T.
4674 -- Underlying_Record_View
4675 -- Defined in record types. Set for record types that are extensions of
4676 -- types with unknown discriminants, and also set for internally built
4677 -- underlying record views to reference its original record type. Record
4678 -- types that are extensions of types with unknown discriminants do not
4679 -- have a completion, but they cannot be used without having some
4680 -- discriminated view at hand. This view is a record type with the same
4681 -- structure, whose parent type is the full view of the parent in the
4682 -- original type extension.
4684 -- Underlying_Type (synthesized)
4685 -- Applies to all entities. This is the identity function except in the
4686 -- case where it is applied to an incomplete or private type, in which
4687 -- case it is the underlying type of the type declared by the completion,
4688 -- or Empty if the completion has not yet been encountered and analyzed.
4690 -- Note: the reason this attribute applies to all entities, and not just
4691 -- types, is to legitimize code where Underlying_Type is applied to an
4692 -- entity which may or may not be a type, with the intent that if it is a
4693 -- type, its underlying type is taken.
4695 -- Note also that the value of this attribute is interesting only after
4696 -- the full view of the parent type has been processed. If the parent
4697 -- type is declared in an enclosing package, the attribute will be non-
4698 -- trivial only after the full view of the type has been analyzed.
4700 -- Universal_Aliasing [implementation base type only]
4701 -- Defined in all type entities. Set to direct the back-end to avoid
4702 -- any optimizations based on type-based alias analysis for this type.
4703 -- Indicates that objects of this type can alias objects of any other
4704 -- types, which guarantees that any objects can be referenced through
4705 -- access types designating this type safely, whatever the actual type
4706 -- of these objects. In other words, the effect is as though access
4707 -- types designating this type were subject to No_Strict_Aliasing.
4709 -- Unset_Reference
4710 -- Defined in variables and out parameters. This is normally Empty. It
4711 -- is set to point to an identifier that represents a reference to the
4712 -- entity before any value has been set. Only the first such reference
4713 -- is identified. This field is used to generate a warning message if
4714 -- necessary (see Sem_Warn.Check_Unset_Reference).
4716 -- Used_As_Generic_Actual
4717 -- Defined in all entities, set if the entity is used as an argument to
4718 -- a generic instantiation. Used to tune certain warning messages, and
4719 -- in checking type conformance within an instantiation that involves
4720 -- incomplete formal and actual types.
4722 -- Uses_Lock_Free
4723 -- Defined in protected type entities. Set to True when the Lock Free
4724 -- implementation is used for the protected type. This implementation is
4725 -- based on atomic transactions and doesn't require anymore the use of
4726 -- Protection object (see System.Tasking.Protected_Objects).
4728 -- Uses_Sec_Stack
4729 -- Defined in scope entities (blocks, entries, entry families, functions,
4730 -- loops, and procedures). Set to True when the secondary stack is used
4731 -- in this scope and must be released on exit unless flag
4732 -- Sec_Stack_Needed_For_Return is set.
4734 -- Validated_Object
4735 -- Defined in variables. Contains the object whose value is captured by
4736 -- the variable for validity check purposes.
4738 -- Warnings_Off
4739 -- Defined in all entities. Set if a pragma Warnings (Off, entity-name)
4740 -- is used to suppress warnings for a given entity. It is also used by
4741 -- the compiler in some situations to kill spurious warnings. Note that
4742 -- clients should generally not test this flag directly, but instead
4743 -- use function Has_Warnings_Off.
4745 -- Warnings_Off_Used
4746 -- Defined in all entities. Can only be set if Warnings_Off is set. If
4747 -- set indicates that a warning was suppressed by the Warnings_Off flag,
4748 -- and Unmodified/Unreferenced would not have suppressed the warning.
4750 -- Warnings_Off_Used_Unmodified
4751 -- Defined in all entities. Can only be set if Warnings_Off is set and
4752 -- Has_Pragma_Unmodified is not set. If set indicates that a warning was
4753 -- suppressed by the Warnings_Off status but that pragma Unmodified
4754 -- would also have suppressed the warning.
4756 -- Warnings_Off_Used_Unreferenced
4757 -- Defined in all entities. Can only be set if Warnings_Off is set and
4758 -- Has_Pragma_Unreferenced is not set. If set indicates that a warning
4759 -- was suppressed by the Warnings_Off status but that pragma Unreferenced
4760 -- would also have suppressed the warning.
4762 -- Was_Hidden
4763 -- Defined in all entities. Used to save the value of the Is_Hidden
4764 -- attribute when the limited-view is installed (Ada 2005: AI-217).
4766 -- Wrapped_Entity
4767 -- Defined in functions and procedures which have been classified as
4768 -- Is_Primitive_Wrapper. Set to the entity being wrapper.
4770 -- Wrapped_Statements
4771 -- Defined in functions, procedures, entries, and entry families. Refers
4772 -- to the entity of the _Wrapped_Statements procedure which gets
4773 -- generated as part of the expansion of contracts and postconditions
4774 -- and contains its enclosing subprogram's original source declarations
4775 -- and statements.
4777 -- LSP_Subprogram
4778 -- Defined in subprogram entities. Set on wrappers created to handle
4779 -- inherited class-wide pre/post conditions that call overridden
4780 -- primitives. It references the parent primitive that has the
4781 -- class-wide pre/post conditions.
4783 ---------------------------
4784 -- Renaming and Aliasing --
4785 ---------------------------
4787 -- Several entity attributes relate to renaming constructs, and to the use of
4788 -- different names to refer to the same entity. The following is a summary of
4789 -- these constructs and their preferred uses.
4791 -- There are three related attributes:
4793 -- Renamed_Entity
4794 -- Renamed_Object
4795 -- Alias
4797 -- These are implemented in Einfo.Utils as renamings of the Renamed_Or_Alias
4798 -- field. They are semantically related, and have the following intended uses:
4800 -- a) Renamed_Entity applies to entities in renaming declarations that rename
4801 -- an entity, so the value of the attribute IS an entity. This applies to
4802 -- generic renamings, package renamings, exception renamings, and subprogram
4803 -- renamings that rename a subprogram (rather than an attribute, an entry, a
4804 -- protected operation, etc).
4806 -- b) Alias applies to overloadable entities, and the value is an overloadable
4807 -- entity. So this is a subset of the previous one. We use the term Alias to
4808 -- cover both renamings and inherited operations, because both cases are
4809 -- handled in the same way when expanding a call. Namely the Alias of a given
4810 -- subprogram is the subprogram that will actually be called.
4812 -- Both a) and b) are set transitively, so that in fact it is not necessary to
4813 -- traverse chains of renamings when looking for the original entity: it's
4814 -- there in one step (this is done when analyzing renaming declarations other
4815 -- than object renamings in sem_ch8).
4817 -- c) Renamed_Object applies to constants and variables. Given that the name
4818 -- in an object renaming declaration is not necessarily an entity name, the
4819 -- value of the attribute is the tree for that name, eg AR (1).Comp. The case
4820 -- when that name is in fact an entity is not handled specially. This is why
4821 -- in a few cases we need to use a loop to trace a chain of object renamings
4822 -- where all of them happen to be entities. So:
4824 -- X : Integer;
4825 -- Y : Integer renames X; -- renamed object is the identifier X
4826 -- Z : Integer renames Y; -- renamed object is the identifier Y
4828 -- The front-end does not store explicitly the fact that Z renames X.
4830 ------------------
4831 -- Access Kinds --
4832 ------------------
4834 -- The following entity kinds are introduced by the corresponding type
4835 -- definitions:
4837 -- E_Access_Type,
4838 -- E_General_Access_Type,
4839 -- E_Anonymous_Access_Type
4841 -- E_Access_Subprogram_Type,
4842 -- E_Anonymous_Access_Subprogram_Type,
4844 -- E_Access_Protected_Subprogram_Type,
4845 -- E_Anonymous_Access_Protected_Subprogram_Type
4847 -- E_Access_Subtype is for an access subtype created by a subtype declaration
4849 -- In addition, we define the kind E_Allocator_Type to label allocators.
4850 -- This is because special resolution rules apply to this construct.
4851 -- Eventually the constructs are labeled with the access type imposed by
4852 -- the context. The backend should never see types with this Ekind.
4854 -- Similarly, we define the kind E_Access_Attribute_Type as the initial
4855 -- kind associated with an access attribute whose prefix is an object.
4856 -- After resolution, a specific access type will be established instead
4857 -- as determined by the context. Note that, for the case of an access
4858 -- attribute whose prefix is a subprogram, we build a corresponding type
4859 -- with E_Access_Subprogram_Type or E_Access_Protected_Subprogram_Type kind
4860 -- but whose designated type is the subprogram itself, instead of a regular
4861 -- E_Subprogram_Type entity.
4863 --------------------------------------------------------
4864 -- Description of Defined Attributes for Entity_Kinds --
4865 --------------------------------------------------------
4867 -- For each enumeration value defined in Entity_Kind we list all the
4868 -- attributes defined in Einfo which can legally be applied to an entity
4869 -- of that kind. The implementation of the attribute functions (and for
4870 -- non-synthesized attributes, of the corresponding set procedures) are
4871 -- in the Einfo body.
4873 -- The following attributes are defined in all entities
4875 -- Ekind (Ekind)
4877 -- Chars
4878 -- Next_Entity
4879 -- Scope
4880 -- Homonym
4881 -- Etype
4882 -- First_Rep_Item
4883 -- Freeze_Node
4884 -- Prev_Entity
4885 -- Associated_Entity
4887 -- Address_Taken
4888 -- Can_Never_Be_Null
4889 -- Checks_May_Be_Suppressed
4890 -- Debug_Info_Off
4891 -- Has_Convention_Pragma
4892 -- Has_Delayed_Aspects
4893 -- Has_Delayed_Freeze
4894 -- Has_Fully_Qualified_Name
4895 -- Has_Gigi_Rep_Item
4896 -- Has_Homonym
4897 -- Has_Pragma_Elaborate_Body
4898 -- Has_Pragma_Inline
4899 -- Has_Pragma_Inline_Always
4900 -- Has_Pragma_No_Inline
4901 -- Has_Pragma_Pure
4902 -- Has_Pragma_Pure_Function
4903 -- Has_Pragma_Thread_Local_Storage
4904 -- Has_Pragma_Unmodified
4905 -- Has_Pragma_Unreferenced
4906 -- Has_Pragma_Unused
4907 -- Has_Private_Declaration
4908 -- Has_Qualified_Name
4909 -- Has_Stream_Size_Clause
4910 -- Has_Unknown_Discriminants
4911 -- Has_Xref_Entry
4912 -- In_Private_Part
4913 -- Is_Ada_2005_Only
4914 -- Is_Ada_2012_Only
4915 -- Is_Ada_2022_Only
4916 -- Is_Bit_Packed_Array (base type only)
4917 -- Is_Aliased
4918 -- Is_Character_Type
4919 -- Is_Checked_Ghost_Entity
4920 -- Is_Child_Unit
4921 -- Is_Compilation_Unit
4922 -- Is_Descendant_Of_Address
4923 -- Is_Discrim_SO_Function
4924 -- Is_Discriminant_Check_Function
4925 -- Is_Dispatch_Table_Entity
4926 -- Is_Dispatch_Table_Wrapper
4927 -- Is_Dispatching_Operation
4928 -- Is_Entry_Formal
4929 -- Is_Exported
4930 -- Is_First_Subtype
4931 -- Is_Formal_Subprogram
4932 -- Is_Generic_Instance
4933 -- Is_Generic_Type
4934 -- Is_Hidden
4935 -- Is_Hidden_Open_Scope
4936 -- Is_Ignored_Ghost_Entity
4937 -- Is_Immediately_Visible
4938 -- Is_Implementation_Defined
4939 -- Is_Imported
4940 -- Is_Inlined
4941 -- Is_Internal
4942 -- Is_Itype
4943 -- Is_Known_Non_Null
4944 -- Is_Known_Null
4945 -- Is_Known_Valid
4946 -- Is_Limited_Composite
4947 -- Is_Limited_Record
4948 -- Is_Loop_Parameter
4949 -- Is_Obsolescent
4950 -- Is_Package_Body_Entity
4951 -- Is_Packed_Array_Impl_Type
4952 -- Is_Potentially_Use_Visible
4953 -- Is_Preelaborated
4954 -- Is_Primitive_Wrapper
4955 -- Is_Public
4956 -- Is_Pure
4957 -- Is_Remote_Call_Interface
4958 -- Is_Remote_Types
4959 -- Is_Renaming_Of_Object
4960 -- Is_Shared_Passive
4961 -- Is_Statically_Allocated
4962 -- Is_Static_Type
4963 -- Is_Tagged_Type
4964 -- Is_Thunk
4965 -- Is_Trivial_Subprogram
4966 -- Is_Unchecked_Union
4967 -- Is_Unimplemented
4968 -- Is_Visible_Formal
4969 -- Kill_Elaboration_Checks
4970 -- Kill_Range_Checks
4971 -- Low_Bound_Tested
4972 -- Materialize_Entity
4973 -- Needs_Debug_Info
4974 -- Never_Set_In_Source
4975 -- No_Return
4976 -- Overlays_Constant
4977 -- Referenced
4978 -- Referenced_As_LHS
4979 -- Referenced_As_Out_Parameter
4980 -- Suppress_Elaboration_Warnings
4981 -- Suppress_Style_Checks
4982 -- Suppress_Value_Tracking_On_Call
4983 -- Used_As_Generic_Actual
4984 -- Warnings_Off
4985 -- Warnings_Off_Used
4986 -- Warnings_Off_Used_Unmodified
4987 -- Warnings_Off_Used_Unreferenced
4988 -- Was_Hidden
4990 -- Declaration_Node (synth)
4991 -- Has_Foreign_Convention (synth)
4992 -- Is_Dynamic_Scope (synth)
4993 -- Is_Ghost_Entity (synth)
4994 -- Is_Standard_Character_Type (synth)
4995 -- Is_Standard_String_Type (synth)
4996 -- Underlying_Type (synth)
4997 -- all classification attributes (synth)
4999 -- The following list of access functions applies to all entities for
5000 -- types and subtypes. References to this list appear subsequently as
5001 -- "(plus type attributes)" for each appropriate Entity_Kind.
5003 -- Associated_Node_For_Itype
5004 -- Class_Wide_Type
5005 -- Full_View
5006 -- Esize
5007 -- RM_Size
5008 -- Alignment
5009 -- Pending_Access_Types
5010 -- Related_Expression
5011 -- Current_Use_Clause
5012 -- Subprograms_For_Type
5013 -- Derived_Type_Link
5014 -- No_Tagged_Streams_Pragma
5015 -- Linker_Section_Pragma
5016 -- SPARK_Pragma
5018 -- Depends_On_Private
5019 -- Disable_Controlled
5020 -- Discard_Names
5021 -- Finalize_Storage_Only (base type only)
5022 -- From_Limited_With
5023 -- Has_Aliased_Components (base type only)
5024 -- Has_Alignment_Clause
5025 -- Has_Atomic_Components (base type only)
5026 -- Has_Completion_In_Body
5027 -- Has_Complex_Representation (base type only)
5028 -- Has_Constrained_Partial_View
5029 -- Has_Controlled_Component (base type only)
5030 -- Has_Default_Aspect (base type only)
5031 -- Has_Delayed_Rep_Aspects
5032 -- Has_Discriminants
5033 -- Has_Dynamic_Predicate_Aspect
5034 -- Has_Independent_Components (base type only)
5035 -- Has_Inheritable_Invariants (base type only)
5036 -- Has_Inherited_DIC (base type only)
5037 -- Has_Inherited_Invariants (base type only)
5038 -- Has_Non_Standard_Rep (base type only)
5039 -- Has_Object_Size_Clause
5040 -- Has_Own_DIC (base type only)
5041 -- Has_Own_Invariants (base type only)
5042 -- Has_Pragma_Preelab_Init
5043 -- Has_Pragma_Unreferenced_Objects
5044 -- Has_Predicates
5045 -- Has_Primitive_Operations (base type only)
5046 -- Has_Protected (base type only)
5047 -- Has_Size_Clause
5048 -- Has_Specified_Layout (base type only)
5049 -- Has_Specified_Stream_Input
5050 -- Has_Specified_Stream_Output
5051 -- Has_Specified_Stream_Read
5052 -- Has_Specified_Stream_Write
5053 -- Has_Static_Predicate
5054 -- Has_Static_Predicate_Aspect
5055 -- Has_Task (base type only)
5056 -- Has_Timing_Event (base type only)
5057 -- Has_Unchecked_Union (base type only)
5058 -- Has_Volatile_Components (base type only)
5059 -- In_Use
5060 -- Is_Abstract_Type
5061 -- Is_Asynchronous
5062 -- Is_Atomic
5063 -- Is_Constr_Subt_For_U_Nominal
5064 -- Is_Constr_Subt_For_UN_Aliased
5065 -- Is_Controlled_Active (base type only)
5066 -- Is_Eliminated
5067 -- Is_Frozen
5068 -- Is_Generic_Actual_Type
5069 -- Is_Independent
5070 -- Is_Non_Static_Subtype
5071 -- Is_Packed (base type only)
5072 -- Is_Private_Composite
5073 -- Is_RACW_Stub_Type
5074 -- Is_Unsigned_Type
5075 -- Is_Volatile
5076 -- Is_Volatile_Full_Access
5077 -- Itype_Printed (itypes only)
5078 -- Known_To_Have_Preelab_Init
5079 -- May_Inherit_Delayed_Rep_Aspects
5080 -- Must_Be_On_Byte_Boundary
5081 -- Must_Have_Preelab_Init
5082 -- Optimize_Alignment_Space
5083 -- Optimize_Alignment_Time
5084 -- Partial_View_Has_Unknown_Discr
5085 -- Size_Depends_On_Discriminant
5086 -- Size_Known_At_Compile_Time
5087 -- SPARK_Pragma_Inherited
5088 -- Strict_Alignment (base type only)
5089 -- Suppress_Initialization
5090 -- Treat_As_Volatile
5091 -- Universal_Aliasing (impl base type only)
5093 -- Alignment_Clause (synth)
5094 -- Base_Type (synth)
5095 -- DIC_Procedure (synth)
5096 -- Has_DIC (synth)
5097 -- Has_Invariants (synth)
5098 -- Implementation_Base_Type (synth)
5099 -- Invariant_Procedure (synth)
5100 -- Is_Access_Protected_Subprogram_Type (synth)
5101 -- Is_Full_Access (synth)
5102 -- Is_Controlled (synth)
5103 -- Object_Size_Clause (synth)
5104 -- Partial_DIC_Procedure (synth)
5105 -- Partial_Invariant_Procedure (synth)
5106 -- Predicate_Function (synth)
5107 -- Root_Type (synth)
5108 -- Size_Clause (synth)
5110 ------------------------------------------
5111 -- Applicable attributes by entity kind --
5112 ------------------------------------------
5114 -- In the conversion to variable-sized nodes and entities, a number of
5115 -- discrepancies were noticed. They are documented in comments, and marked
5116 -- with "$$$".
5118 -- E_Abstract_State
5119 -- Refinement_Constituents
5120 -- Part_Of_Constituents
5121 -- Body_References
5122 -- Non_Limited_View
5123 -- Encapsulating_State
5124 -- SPARK_Pragma
5125 -- From_Limited_With
5126 -- Has_Partial_Visible_Refinement
5127 -- Has_Visible_Refinement
5128 -- SPARK_Pragma_Inherited
5129 -- First_Entity $$$
5130 -- Has_Non_Limited_View (synth)
5131 -- Has_Non_Null_Visible_Refinement (synth)
5132 -- Has_Null_Visible_Refinement (synth)
5133 -- Is_External_State (synth)
5134 -- Is_Null_State (synth)
5135 -- Is_Relaxed_Initialization_State (synth)
5136 -- Is_Synchronized_State (synth)
5137 -- Partial_Refinement_Constituents (synth)
5139 -- E_Access_Protected_Subprogram_Type
5140 -- Equivalent_Type
5141 -- Directly_Designated_Type
5142 -- Needs_No_Actuals
5143 -- Can_Use_Internal_Rep
5144 -- (plus type attributes)
5146 -- E_Access_Subprogram_Type
5147 -- Equivalent_Type (remote types only)
5148 -- Directly_Designated_Type
5149 -- Needs_No_Actuals
5150 -- Original_Access_Type
5151 -- Can_Use_Internal_Rep
5152 -- Needs_Activation_Record
5153 -- Associated_Storage_Pool $$$
5154 -- Interface_Name $$$
5155 -- (plus type attributes)
5157 -- E_Access_Type
5158 -- E_Access_Subtype
5159 -- Direct_Primitive_Operations $$$ type
5160 -- Master_Id
5161 -- Directly_Designated_Type
5162 -- Associated_Storage_Pool (base type only)
5163 -- Finalization_Master (base type only)
5164 -- Storage_Size_Variable (base type only)
5165 -- Has_Pragma_Controlled (base type only)
5166 -- Has_Storage_Size_Clause (base type only)
5167 -- Is_Access_Constant
5168 -- Is_Local_Anonymous_Access
5169 -- Is_Pure_Unit_Access_Type
5170 -- No_Pool_Assigned (base type only)
5171 -- No_Strict_Aliasing (base type only)
5172 -- Is_Param_Block_Component_Type (base type only)
5173 -- (plus type attributes)
5175 -- E_Access_Attribute_Type
5176 -- Renamed_Entity $$$
5177 -- Directly_Designated_Type
5178 -- (plus type attributes)
5180 -- E_Allocator_Type
5181 -- Directly_Designated_Type
5182 -- Associated_Storage_Pool $$$
5183 -- (plus type attributes)
5185 -- E_Anonymous_Access_Subprogram_Type
5186 -- E_Anonymous_Access_Protected_Subprogram_Type
5187 -- Interface_Name $$$ E_Anonymous_Access_Subprogram_Type
5188 -- Directly_Designated_Type
5189 -- Storage_Size_Variable is this needed ???
5190 -- Can_Use_Internal_Rep
5191 -- Needs_Activation_Record
5192 -- (plus type attributes)
5194 -- E_Anonymous_Access_Type
5195 -- Directly_Designated_Type
5196 -- Finalization_Master
5197 -- Storage_Size_Variable is this needed ???
5198 -- Associated_Storage_Pool $$$
5199 -- (plus type attributes)
5201 -- E_Array_Type
5202 -- E_Array_Subtype
5203 -- First_Entity $$$
5204 -- Direct_Primitive_Operations $$$ subtype
5205 -- Renamed_Object $$$ E_Array_Subtype
5206 -- First_Index
5207 -- Default_Aspect_Component_Value (base type only)
5208 -- Component_Type (base type only)
5209 -- Original_Array_Type
5210 -- Component_Size (base type only)
5211 -- Packed_Array_Impl_Type
5212 -- Related_Array_Object
5213 -- Predicated_Parent (subtype only)
5214 -- Component_Alignment (special) (base type only)
5215 -- Has_Component_Size_Clause (base type only)
5216 -- Has_Pragma_Pack (impl base type only)
5217 -- Is_Constrained
5218 -- Reverse_Storage_Order (base type only)
5219 -- SSO_Set_High_By_Default (base type only)
5220 -- SSO_Set_Low_By_Default (base type only)
5221 -- Next_Index (synth)
5222 -- Number_Dimensions (synth)
5223 -- (plus type attributes)
5225 -- E_Block
5226 -- Renamed_Entity $$$
5227 -- Renamed_Object $$$
5228 -- Return_Applies_To
5229 -- Block_Node
5230 -- First_Entity
5231 -- Last_Entity
5232 -- Scope_Depth_Value
5233 -- Entry_Cancel_Parameter
5234 -- Contains_Ignored_Ghost_Code
5235 -- Delay_Cleanups
5236 -- Discard_Names
5237 -- Has_Master_Entity
5238 -- Has_Nested_Block_With_Handler
5239 -- Is_Exception_Handler
5240 -- Sec_Stack_Needed_For_Return
5241 -- Uses_Sec_Stack
5242 -- Scope_Depth (synth)
5244 -- E_Class_Wide_Type
5245 -- E_Class_Wide_Subtype
5246 -- Direct_Primitive_Operations
5247 -- Cloned_Subtype (subtype case only)
5248 -- First_Entity
5249 -- Equivalent_Type (always Empty for type)
5250 -- Non_Limited_View
5251 -- Last_Entity
5252 -- SSO_Set_High_By_Default (base type only)
5253 -- SSO_Set_Low_By_Default (base type only)
5254 -- Corresponding_Remote_Type $$$ type
5255 -- Renamed_Entity $$$ type
5256 -- First_Component (synth)
5257 -- First_Component_Or_Discriminant (synth)
5258 -- Has_Non_Limited_View (synth)
5259 -- (plus type attributes)
5261 -- E_Component
5262 -- Linker_Section_Pragma $$$
5263 -- Normalized_First_Bit
5264 -- Current_Value (always Empty)
5265 -- Component_Bit_Offset
5266 -- Esize
5267 -- Component_Clause
5268 -- Normalized_Position
5269 -- DT_Entry_Count
5270 -- Entry_Formal
5271 -- Prival
5272 -- Renamed_Object (always Empty)
5273 -- Discriminant_Checking_Func
5274 -- Corresponding_Record_Component
5275 -- Original_Record_Component
5276 -- DT_Offset_To_Top_Func
5277 -- Related_Type
5278 -- Has_Biased_Representation
5279 -- Has_Per_Object_Constraint
5280 -- Is_Atomic
5281 -- Is_Independent
5282 -- Is_Return_Object
5283 -- Is_Tag
5284 -- Is_Volatile
5285 -- Is_Volatile_Full_Access
5286 -- Treat_As_Volatile
5287 -- Is_Full_Access (synth)
5288 -- Next_Component (synth)
5289 -- Next_Component_Or_Discriminant (synth)
5291 -- E_Constant
5292 -- E_Loop_Parameter
5293 -- Current_Value (always Empty)
5294 -- Discriminal_Link
5295 -- Full_View
5296 -- Esize
5297 -- Extra_Accessibility (constants only)
5298 -- Alignment
5299 -- Status_Flag_Or_Transient_Decl
5300 -- Actual_Subtype
5301 -- Renamed_Object
5302 -- Renamed_Entity $$$
5303 -- Size_Check_Code (constants only)
5304 -- Prival_Link (privals only)
5305 -- Interface_Name (constants only)
5306 -- Related_Type (constants only)
5307 -- Initialization_Statements
5308 -- BIP_Initialization_Call
5309 -- Last_Aggregate_Assignment
5310 -- Activation_Record_Component
5311 -- Encapsulating_State (constants only)
5312 -- Linker_Section_Pragma
5313 -- Contract (constants only)
5314 -- SPARK_Pragma (constants only)
5315 -- Has_Alignment_Clause
5316 -- Has_Atomic_Components
5317 -- Has_Biased_Representation
5318 -- Has_Completion (constants only)
5319 -- Has_Independent_Components
5320 -- Has_Size_Clause
5321 -- Has_Thunks (constants only)
5322 -- Has_Volatile_Components
5323 -- Is_Atomic
5324 -- Is_Elaboration_Checks_OK_Id (constants only)
5325 -- Is_Elaboration_Warnings_OK_Id (constants only)
5326 -- Is_Eliminated
5327 -- Is_Finalized_Transient
5328 -- Is_Ignored_Transient
5329 -- Is_Independent
5330 -- Is_Return_Object
5331 -- Is_True_Constant
5332 -- Is_Uplevel_Referenced_Entity
5333 -- Is_Volatile
5334 -- Is_Volatile_Full_Access
5335 -- Optimize_Alignment_Space (constants only)
5336 -- Optimize_Alignment_Time (constants only)
5337 -- SPARK_Pragma_Inherited (constants only)
5338 -- Stores_Attribute_Old_Prefix (constants only)
5339 -- Treat_As_Volatile
5340 -- Address_Clause (synth)
5341 -- Alignment_Clause (synth)
5342 -- Is_Elaboration_Target (synth)
5343 -- Is_Full_Access (synth)
5344 -- Size_Clause (synth)
5346 -- E_Decimal_Fixed_Point_Type
5347 -- E_Decimal_Fixed_Point_Subtype
5348 -- Scale_Value
5349 -- Digits_Value
5350 -- Scalar_Range
5351 -- Delta_Value
5352 -- Small_Value
5353 -- Static_Real_Or_String_Predicate
5354 -- Has_Machine_Radix_Clause
5355 -- Machine_Radix_10
5356 -- Aft_Value (synth)
5357 -- Type_Low_Bound (synth)
5358 -- Type_High_Bound (synth)
5359 -- (plus type attributes)
5361 -- E_Discriminant
5362 -- Normalized_First_Bit
5363 -- Current_Value (always Empty)
5364 -- Component_Bit_Offset
5365 -- Esize
5366 -- Component_Clause
5367 -- Normalized_Position
5368 -- Discriminant_Number
5369 -- Discriminal
5370 -- Renamed_Object (always Empty)
5371 -- Corresponding_Discriminant
5372 -- Discriminant_Default_Value
5373 -- Corresponding_Record_Component
5374 -- Original_Record_Component
5375 -- CR_Discriminant
5376 -- Is_Completely_Hidden
5377 -- Is_Return_Object
5378 -- Entry_Formal $$$
5379 -- Linker_Section_Pragma $$$
5380 -- Next_Component_Or_Discriminant (synth)
5381 -- Next_Discriminant (synth)
5382 -- Next_Stored_Discriminant (synth)
5384 -- E_Entry
5385 -- E_Entry_Family
5386 -- Protected_Body_Subprogram
5387 -- Barrier_Function
5388 -- Elaboration_Entity
5389 -- Entry_Parameters_Type
5390 -- First_Entity
5391 -- Alias (for entry only. Empty)
5392 -- Last_Entity
5393 -- Accept_Address
5394 -- Scope_Depth_Value
5395 -- Protection_Object (protected kind)
5396 -- Contract_Wrapper
5397 -- Extra_Formals
5398 -- Contract
5399 -- SPARK_Pragma (protected kind)
5400 -- Default_Expressions_Processed
5401 -- Entry_Accepted
5402 -- Has_Yield_Aspect
5403 -- Has_Expanded_Contract
5404 -- Ignore_SPARK_Mode_Pragmas
5405 -- Is_Elaboration_Checks_OK_Id
5406 -- Is_Elaboration_Warnings_OK_Id
5407 -- Is_Entry_Wrapper
5408 -- Needs_No_Actuals
5409 -- Sec_Stack_Needed_For_Return
5410 -- SPARK_Pragma_Inherited (protected kind)
5411 -- Uses_Sec_Stack
5412 -- Renamed_Entity $$$
5413 -- Address_Clause (synth)
5414 -- Entry_Index_Type (synth)
5415 -- First_Formal (synth)
5416 -- First_Formal_With_Extras (synth)
5417 -- Is_Elaboration_Target (synth)
5418 -- Last_Formal (synth)
5419 -- Number_Formals (synth)
5420 -- Scope_Depth (synth)
5422 -- E_Entry_Index_Parameter
5423 -- Entry_Index_Constant
5425 -- E_Enumeration_Literal
5426 -- Enumeration_Pos
5427 -- Enumeration_Rep
5428 -- Alias
5429 -- Enumeration_Rep_Expr
5430 -- Interface_Name $$$
5431 -- Renamed_Object $$$
5432 -- Esize $$$
5433 -- Renamed_Entity $$$
5434 -- Next_Literal (synth)
5436 -- E_Enumeration_Type
5437 -- E_Enumeration_Subtype
5438 -- First_Entity $$$ type
5439 -- Renamed_Object $$$
5440 -- Lit_Strings (root type only)
5441 -- First_Literal
5442 -- Lit_Indexes (root type only)
5443 -- Default_Aspect_Value (base type only)
5444 -- Scalar_Range
5445 -- Lit_Hash (root type only)
5446 -- Enum_Pos_To_Rep (type only)
5447 -- Static_Discrete_Predicate
5448 -- Has_Biased_Representation
5449 -- Has_Contiguous_Rep
5450 -- Has_Enumeration_Rep_Clause
5451 -- Has_Pragma_Ordered (base type only)
5452 -- Nonzero_Is_True (base type only)
5453 -- No_Predicate_On_Actual
5454 -- No_Dynamic_Predicate_On_Actual
5455 -- Type_Low_Bound (synth)
5456 -- Type_High_Bound (synth)
5457 -- (plus type attributes)
5459 -- E_Exception
5460 -- Esize
5461 -- Alignment
5462 -- Renamed_Entity
5463 -- Register_Exception_Call
5464 -- Interface_Name
5465 -- Activation_Record_Component
5466 -- Discard_Names
5467 -- Is_Raised
5468 -- Renamed_Object $$$
5470 -- E_Exception_Type
5471 -- Equivalent_Type
5472 -- (plus type attributes)
5474 -- E_Floating_Point_Type
5475 -- E_Floating_Point_Subtype
5476 -- Digits_Value
5477 -- Float_Rep (Float_Rep_Kind)
5478 -- Default_Aspect_Value (base type only)
5479 -- Scalar_Range
5480 -- Static_Real_Or_String_Predicate
5481 -- Machine_Emax_Value (synth)
5482 -- Machine_Emin_Value (synth)
5483 -- Machine_Mantissa_Value (synth)
5484 -- Machine_Radix_Value (synth)
5485 -- Model_Emin_Value (synth)
5486 -- Model_Epsilon_Value (synth)
5487 -- Model_Mantissa_Value (synth)
5488 -- Model_Small_Value (synth)
5489 -- Safe_Emax_Value (synth)
5490 -- Safe_First_Value (synth)
5491 -- Safe_Last_Value (synth)
5492 -- Type_Low_Bound (synth)
5493 -- Type_High_Bound (synth)
5494 -- (plus type attributes)
5496 -- E_Function
5497 -- E_Generic_Function
5498 -- Mechanism (Mechanism_Type)
5499 -- Handler_Records (non-generic case only)
5500 -- Protected_Body_Subprogram
5501 -- Next_Inlined_Subprogram
5502 -- Elaboration_Entity (not implicit /=)
5503 -- DT_Position
5504 -- DTC_Entity
5505 -- First_Entity
5506 -- Alias (non-generic case only)
5507 -- Renamed_Entity
5508 -- Renamed_Object $$$
5509 -- Extra_Accessibility_Of_Result (non-generic case only)
5510 -- Last_Entity
5511 -- Interface_Name
5512 -- Scope_Depth_Value
5513 -- Generic_Renamings (for an instance)
5514 -- Inner_Instances (generic case only)
5515 -- Inner_Instances $$$ also E_Function
5516 -- Protection_Object (for concurrent kind)
5517 -- Subps_Index (non-generic case only)
5518 -- Interface_Alias
5519 -- LSP_Subprogram (non-generic case only)
5520 -- Overridden_Operation
5521 -- Wrapped_Entity (non-generic case only)
5522 -- Extra_Formals
5523 -- Anonymous_Masters (non-generic case only)
5524 -- Corresponding_Equality (implicit /= only)
5525 -- Thunk_Entity (thunk case only)
5526 -- Corresponding_Procedure (generate C code only)
5527 -- Linker_Section_Pragma
5528 -- Contract
5529 -- Import_Pragma (non-generic case only)
5530 -- Class_Postconditions
5531 -- Class_Preconditions
5532 -- Class_Preconditions_Subprogram
5533 -- Dynamic_Call_Helper
5534 -- Ignored_Class_Preconditions
5535 -- Ignored_Class_Postconditions
5536 -- Indirect_Call_Wrapper
5537 -- Static_Call_Helper
5538 -- Protected_Subprogram (non-generic case only)
5539 -- SPARK_Pragma
5540 -- Original_Protected_Subprogram
5541 -- Body_Needed_For_SAL
5542 -- Contains_Ignored_Ghost_Code
5543 -- Default_Expressions_Processed
5544 -- Delay_Cleanups
5545 -- Delay_Subprogram_Descriptors
5546 -- Discard_Names
5547 -- Elaboration_Entity_Required
5548 -- Has_Completion
5549 -- Has_Controlling_Result
5550 -- Has_Expanded_Contract (non-generic case only)
5551 -- Has_Master_Entity
5552 -- Has_Missing_Return
5553 -- Has_Nested_Block_With_Handler
5554 -- Has_Nested_Subprogram
5555 -- Has_Out_Or_In_Out_Parameter
5556 -- Has_Recursive_Call
5557 -- Has_Yield_Aspect
5558 -- Ignore_SPARK_Mode_Pragmas
5559 -- Is_Abstract_Subprogram (non-generic case only)
5560 -- Is_Called (non-generic case only)
5561 -- Is_Class_Wide_Wrapper
5562 -- Is_Constructor
5563 -- Is_CUDA_Kernel (non-generic case only)
5564 -- Is_DIC_Procedure (non-generic case only)
5565 -- Is_Discrim_SO_Function
5566 -- Is_Discriminant_Check_Function
5567 -- Is_Elaboration_Checks_OK_Id
5568 -- Is_Elaboration_Warnings_OK_Id
5569 -- Is_Eliminated
5570 -- Is_Generic_Actual_Subprogram (non-generic case only)
5571 -- Is_Hidden_Non_Overridden_Subpgm (non-generic case only)
5572 -- Is_Initial_Condition_Procedure (non-generic case only)
5573 -- Is_Inlined_Always (non-generic case only)
5574 -- Is_Instantiated (generic case only)
5575 -- Is_Intrinsic_Subprogram
5576 -- Is_Invariant_Procedure (non-generic case only)
5577 -- Is_Machine_Code_Subprogram (non-generic case only)
5578 -- Is_Partial_Invariant_Procedure (non-generic case only)
5579 -- Is_Predicate_Function (non-generic case only)
5580 -- Is_Primitive
5581 -- Is_Primitive_Wrapper (non-generic case only)
5582 -- Is_Private_Descendant
5583 -- Is_Private_Primitive (non-generic case only)
5584 -- Is_Pure
5585 -- Is_Visible_Lib_Unit
5586 -- Is_Wrapper
5587 -- Needs_No_Actuals
5588 -- Requires_Overriding (non-generic case only)
5589 -- Return_Present
5590 -- Returns_By_Ref
5591 -- Rewritten_For_C (generate C code only)
5592 -- Sec_Stack_Needed_For_Return
5593 -- SPARK_Pragma_Inherited
5594 -- Uses_Sec_Stack
5595 -- Address_Clause (synth)
5596 -- First_Formal (synth)
5597 -- First_Formal_With_Extras (synth)
5598 -- Is_Elaboration_Target (synth)
5599 -- Last_Formal (synth)
5600 -- Number_Formals (synth)
5601 -- Scope_Depth (synth)
5603 -- E_General_Access_Type
5604 -- First_Entity $$$
5605 -- Renamed_Entity $$$
5606 -- Master_Id
5607 -- Directly_Designated_Type
5608 -- Associated_Storage_Pool (root type only)
5609 -- Finalization_Master (root type only)
5610 -- Storage_Size_Variable (base type only)
5611 -- (plus type attributes)
5613 -- E_Generic_In_Parameter
5614 -- E_Generic_In_Out_Parameter
5615 -- Current_Value (always Empty)
5616 -- Entry_Component
5617 -- Actual_Subtype
5618 -- Renamed_Object (always Empty)
5619 -- Default_Value
5620 -- Protected_Formal
5621 -- Is_Controlling_Formal
5622 -- Is_Return_Object
5623 -- Parameter_Mode (synth)
5625 -- E_Incomplete_Type
5626 -- E_Incomplete_Subtype
5627 -- Direct_Primitive_Operations
5628 -- Non_Limited_View
5629 -- Private_Dependents
5630 -- Discriminant_Constraint
5631 -- Stored_Constraint
5632 -- First_Entity $$$
5633 -- Last_Entity $$$
5634 -- Has_Non_Limited_View (synth)
5635 -- (plus type attributes)
5637 -- E_In_Parameter
5638 -- E_In_Out_Parameter
5639 -- E_Out_Parameter
5640 -- Linker_Section_Pragma $$$
5641 -- Mechanism (Mechanism_Type)
5642 -- Current_Value
5643 -- Discriminal_Link (discriminals only)
5644 -- Entry_Component
5645 -- Esize
5646 -- Extra_Accessibility
5647 -- Alignment
5648 -- Extra_Formal
5649 -- Unset_Reference
5650 -- Actual_Subtype
5651 -- Renamed_Object
5652 -- Spec_Entity
5653 -- Default_Value
5654 -- Default_Expr_Function
5655 -- Protected_Formal
5656 -- Extra_Constrained
5657 -- Minimum_Accessibility
5658 -- Last_Assignment (OUT, IN-OUT only)
5659 -- Activation_Record_Component
5660 -- Has_Initial_Value
5661 -- Is_Controlling_Formal
5662 -- Is_Only_Out_Parameter
5663 -- Low_Bound_Tested
5664 -- Is_Return_Object
5665 -- Is_Activation_Record
5666 -- Parameter_Mode (synth)
5668 -- E_Label
5669 -- Renamed_Object $$$
5670 -- Renamed_Entity $$$
5671 -- Enclosing_Scope
5672 -- Reachable
5674 -- E_Limited_Private_Type
5675 -- E_Limited_Private_Subtype
5676 -- Scalar_Range $$$ type
5677 -- First_Entity
5678 -- Private_Dependents
5679 -- Underlying_Full_View
5680 -- Last_Entity
5681 -- Discriminant_Constraint
5682 -- Stored_Constraint
5683 -- Has_Completion
5684 -- (plus type attributes)
5686 -- E_Loop
5687 -- First_Exit_Statement
5688 -- Has_Exit
5689 -- Has_Loop_Entry_Attributes
5690 -- Has_Master_Entity
5691 -- Has_Nested_Block_With_Handler
5692 -- Uses_Sec_Stack
5693 -- First_Entity $$$
5694 -- Last_Entity $$$
5695 -- Renamed_Object $$$
5697 -- E_Modular_Integer_Type
5698 -- E_Modular_Integer_Subtype
5699 -- Modulus (base type only)
5700 -- Default_Aspect_Value (base type only)
5701 -- Original_Array_Type
5702 -- Scalar_Range
5703 -- Static_Discrete_Predicate
5704 -- Non_Binary_Modulus (base type only)
5705 -- Has_Biased_Representation
5706 -- Has_Shift_Operator (base type only)
5707 -- No_Predicate_On_Actual
5708 -- No_Dynamic_Predicate_On_Actual
5709 -- Type_Low_Bound (synth)
5710 -- Type_High_Bound (synth)
5711 -- (plus type attributes)
5713 -- E_Named_Integer
5714 -- Renamed_Object $$$
5716 -- E_Named_Real
5718 -- E_Operator
5719 -- First_Entity
5720 -- Alias
5721 -- Extra_Accessibility_Of_Result
5722 -- Last_Entity
5723 -- Subps_Index
5724 -- Overridden_Operation
5725 -- Linker_Section_Pragma
5726 -- Contract
5727 -- Import_Pragma
5728 -- LSP_Subprogram
5729 -- SPARK_Pragma
5730 -- Default_Expressions_Processed
5731 -- Has_Nested_Subprogram
5732 -- Ignore_SPARK_Mode_Pragmas
5733 -- Is_Class_Wide_Wrapper
5734 -- Is_Elaboration_Checks_OK_Id
5735 -- Is_Elaboration_Warnings_OK_Id
5736 -- Is_Intrinsic_Subprogram
5737 -- Is_Machine_Code_Subprogram
5738 -- Is_Primitive
5739 -- Is_Pure
5740 -- Is_Wrapper
5741 -- SPARK_Pragma_Inherited
5742 -- Interface_Name $$$
5743 -- Renamed_Entity $$$
5744 -- Renamed_Object $$$
5745 -- Is_Elaboration_Target (synth)
5746 -- Aren't there more flags and fields? seems like this list should be
5747 -- more similar to the E_Function list, which is much longer ???
5749 -- E_Ordinary_Fixed_Point_Type
5750 -- E_Ordinary_Fixed_Point_Subtype
5751 -- Delta_Value
5752 -- Default_Aspect_Value (base type only)
5753 -- Scalar_Range
5754 -- Static_Real_Or_String_Predicate
5755 -- Small_Value
5756 -- Has_Small_Clause
5757 -- Aft_Value (synth)
5758 -- Type_Low_Bound (synth)
5759 -- Type_High_Bound (synth)
5760 -- (plus type attributes)
5762 -- E_Package
5763 -- E_Generic_Package
5764 -- Dependent_Instances (for an instance)
5765 -- Handler_Records (non-generic case only)
5766 -- Generic_Homonym (generic case only)
5767 -- Associated_Formal_Package
5768 -- Elaboration_Entity
5769 -- Related_Instance (non-generic case only)
5770 -- First_Private_Entity
5771 -- First_Entity
5772 -- Renamed_Entity
5773 -- Renamed_Object $$$
5774 -- Body_Entity
5775 -- Last_Entity
5776 -- Interface_Name
5777 -- Scope_Depth_Value
5778 -- Generic_Renamings (for an instance)
5779 -- Inner_Instances (generic case only)
5780 -- Inner_Instances $$$ also E_Package
5781 -- Limited_View (non-generic/instance)
5782 -- Incomplete_Actuals (for an instance)
5783 -- Abstract_States
5784 -- Package_Instantiation
5785 -- Current_Use_Clause
5786 -- Finalizer (non-generic case only)
5787 -- Anonymous_Masters (non-generic case only)
5788 -- Contract
5789 -- SPARK_Pragma
5790 -- SPARK_Aux_Pragma
5791 -- Body_Needed_For_Inlining
5792 -- Body_Needed_For_SAL
5793 -- Contains_Ignored_Ghost_Code
5794 -- Delay_Subprogram_Descriptors
5795 -- Discard_Names
5796 -- Elaborate_Body_Desirable (non-generic case only)
5797 -- Elaboration_Entity_Required
5798 -- From_Limited_With
5799 -- Has_All_Calls_Remote
5800 -- Has_Completion
5801 -- Has_Forward_Instantiation
5802 -- Has_Master_Entity
5803 -- Has_RACW (non-generic case only)
5804 -- Ignore_SPARK_Mode_Pragmas
5805 -- Is_Called (non-generic case only)
5806 -- Is_Elaboration_Checks_OK_Id
5807 -- Is_Elaboration_Warnings_OK_Id
5808 -- Is_Instantiated
5809 -- In_Package_Body
5810 -- Is_Private_Descendant
5811 -- In_Use
5812 -- Is_Visible_Lib_Unit
5813 -- Renamed_In_Spec (non-generic case only)
5814 -- SPARK_Aux_Pragma_Inherited
5815 -- SPARK_Pragma_Inherited
5816 -- Static_Elaboration_Desired (non-generic case only)
5817 -- Renamed_Object $$$
5818 -- Has_Non_Null_Abstract_State (synth)
5819 -- Has_Null_Abstract_State (synth)
5820 -- Is_Elaboration_Target (synth)
5821 -- Is_Wrapper_Package (synth) (non-generic case only)
5822 -- Has_Limited_View (synth) (non-generic case only)
5823 -- Scope_Depth (synth)
5825 -- E_Package_Body
5826 -- Handler_Records (non-generic case only)
5827 -- Related_Instance (non-generic case only)
5828 -- First_Entity
5829 -- Spec_Entity
5830 -- Last_Entity
5831 -- Scope_Depth_Value
5832 -- Finalizer (non-generic case only)
5833 -- Contract
5834 -- SPARK_Pragma
5835 -- SPARK_Aux_Pragma
5836 -- Contains_Ignored_Ghost_Code
5837 -- Delay_Subprogram_Descriptors
5838 -- Ignore_SPARK_Mode_Pragmas
5839 -- SPARK_Aux_Pragma_Inherited
5840 -- SPARK_Pragma_Inherited
5841 -- Renamed_Entity $$$
5842 -- Scope_Depth (synth)
5844 -- E_Private_Type
5845 -- E_Private_Subtype
5846 -- Scalar_Range $$$ type
5847 -- Direct_Primitive_Operations
5848 -- First_Entity
5849 -- Private_Dependents
5850 -- Underlying_Full_View
5851 -- Last_Entity
5852 -- Discriminant_Constraint
5853 -- Stored_Constraint
5854 -- Has_Completion
5855 -- Is_Controlled_Active (base type only)
5856 -- $$$above in (plus type attributes)
5857 -- (plus type attributes)
5859 -- E_Procedure
5860 -- E_Generic_Procedure
5861 -- Associated_Node_For_Itype $$$ E_Procedure
5862 -- Handler_Records (non-generic case only)
5863 -- Protected_Body_Subprogram
5864 -- Next_Inlined_Subprogram
5865 -- Elaboration_Entity
5866 -- DT_Position
5867 -- DTC_Entity
5868 -- First_Entity
5869 -- Alias (non-generic case only)
5870 -- Renamed_Entity
5871 -- Renamed_Object $$$
5872 -- Receiving_Entry (non-generic case only)
5873 -- Last_Entity
5874 -- Interface_Name
5875 -- Scope_Depth_Value
5876 -- Generic_Renamings (for an instance)
5877 -- Inner_Instances (generic case only)
5878 -- Inner_Instances $$$ also E_Procedure
5879 -- Protection_Object (for concurrent kind)
5880 -- Subps_Index (non-generic case only)
5881 -- Interface_Alias
5882 -- LSP_Subprogram (non-generic case only)
5883 -- Overridden_Operation (never for init proc)
5884 -- Wrapped_Entity (non-generic case only)
5885 -- Extra_Formals
5886 -- Anonymous_Masters (non-generic case only)
5887 -- Static_Initialization (init_proc only)
5888 -- Thunk_Entity (thunk case only)
5889 -- Corresponding_Function (generate C code only)
5890 -- Linker_Section_Pragma
5891 -- Contract
5892 -- Import_Pragma (non-generic case only)
5893 -- Class_Postconditions
5894 -- Class_Preconditions
5895 -- Class_Preconditions_Subprogram
5896 -- Dynamic_Call_Helper
5897 -- Ignored_Class_Preconditions
5898 -- Ignored_Class_Postconditions
5899 -- Indirect_Call_Wrapper
5900 -- Static_Call_Helper
5901 -- Protected_Subprogram (non-generic case only)
5902 -- SPARK_Pragma
5903 -- Original_Protected_Subprogram
5904 -- Body_Needed_For_SAL
5905 -- Contains_Ignored_Ghost_Code
5906 -- Delay_Cleanups $$$Dup below
5907 -- Discard_Names $$$Dup below
5908 -- Elaboration_Entity_Required
5909 -- Default_Expressions_Processed
5910 -- Delay_Cleanups
5911 -- Delay_Subprogram_Descriptors
5912 -- Discard_Names
5913 -- Has_Completion
5914 -- Has_Expanded_Contract (non-generic case only)
5915 -- Has_Master_Entity
5916 -- Has_Nested_Block_With_Handler
5917 -- Has_Nested_Subprogram
5918 -- Has_Yield_Aspect
5919 -- Ignore_SPARK_Mode_Pragmas
5920 -- Is_Abstract_Subprogram (non-generic case only)
5921 -- Is_Asynchronous
5922 -- Is_Called (non-generic case only)
5923 -- Is_Class_Wide_Wrapper
5924 -- Is_Constructor
5925 -- Is_CUDA_Kernel
5926 -- Is_DIC_Procedure (non-generic case only)
5927 -- Is_Elaboration_Checks_OK_Id
5928 -- Is_Elaboration_Warnings_OK_Id
5929 -- Is_Eliminated
5930 -- Is_Generic_Actual_Subprogram (non-generic case only)
5931 -- Is_Hidden_Non_Overridden_Subpgm (non-generic case only)
5932 -- Is_Initial_Condition_Procedure (non-generic case only)
5933 -- Is_Inlined_Always (non-generic case only)
5934 -- Is_Instantiated (generic case only)
5935 -- Is_Interrupt_Handler
5936 -- Is_Intrinsic_Subprogram
5937 -- Is_Invariant_Procedure (non-generic case only)
5938 -- Is_Machine_Code_Subprogram (non-generic case only)
5939 -- Is_Null_Init_Proc
5940 -- Is_Partial_DIC_Procedure (synth) (non-generic case only)
5941 -- Is_Partial_Invariant_Procedure (non-generic case only)
5942 -- Is_Predicate_Function (non-generic case only)
5943 -- Is_Primitive
5944 -- Is_Primitive_Wrapper (non-generic case only)
5945 -- Is_Private_Descendant
5946 -- Is_Private_Primitive (non-generic case only)
5947 -- Is_Pure
5948 -- Is_Wrapper
5949 -- Is_Valued_Procedure
5950 -- Is_Visible_Lib_Unit
5951 -- Needs_No_Actuals
5952 -- No_Return
5953 -- Requires_Overriding (non-generic case only)
5954 -- Sec_Stack_Needed_For_Return
5955 -- SPARK_Pragma_Inherited
5956 -- Entry_Parameters_Type $$$
5957 -- Address_Clause (synth)
5958 -- First_Formal (synth)
5959 -- First_Formal_With_Extras (synth)
5960 -- Is_Elaboration_Target (synth)
5961 -- Is_Finalizer (synth)
5962 -- Last_Formal (synth)
5963 -- Number_Formals (synth)
5965 -- E_Protected_Body
5966 -- SPARK_Pragma
5967 -- Ignore_SPARK_Mode_Pragmas
5968 -- SPARK_Pragma_Inherited
5969 -- (any others??? First/Last Entity, Scope_Depth???)
5971 -- E_Protected_Object$$$No such thing
5973 -- E_Protected_Type
5974 -- E_Protected_Subtype
5975 -- Direct_Primitive_Operations
5976 -- First_Private_Entity
5977 -- First_Entity
5978 -- Corresponding_Record_Type
5979 -- Entry_Bodies_Array
5980 -- Last_Entity
5981 -- Discriminant_Constraint
5982 -- Scope_Depth_Value
5983 -- Stored_Constraint
5984 -- Anonymous_Object
5985 -- Contract
5986 -- Entry_Max_Queue_Lengths_Array
5987 -- SPARK_Aux_Pragma
5988 -- Ignore_SPARK_Mode_Pragmas
5989 -- SPARK_Aux_Pragma_Inherited
5990 -- Uses_Lock_Free
5991 -- First_Component (synth)
5992 -- First_Component_Or_Discriminant (synth)
5993 -- Has_Entries (synth)
5994 -- Has_Interrupt_Handler (synth)
5995 -- Number_Entries (synth)
5996 -- Scope_Depth (synth)
5997 -- (plus type attributes)
5999 -- E_Record_Type
6000 -- E_Record_Subtype
6001 -- Renamed_Entity $$$ type
6002 -- Interface_Name $$$ type
6003 -- Direct_Primitive_Operations
6004 -- Access_Disp_Table (base type only)
6005 -- Cloned_Subtype (subtype case only)
6006 -- First_Entity
6007 -- Corresponding_Concurrent_Type
6008 -- Parent_Subtype (base type only)
6009 -- Last_Entity
6010 -- Discriminant_Constraint
6011 -- Corresponding_Remote_Type
6012 -- Stored_Constraint
6013 -- Interfaces
6014 -- Dispatch_Table_Wrappers (base type only)
6015 -- Underlying_Record_View (base type only)
6016 -- Access_Disp_Table_Elab_Flag (base type only)
6017 -- Predicated_Parent (subtype only)
6018 -- Component_Alignment (special) (base type only)
6019 -- C_Pass_By_Copy (base type only)
6020 -- Has_Dispatch_Table (base tagged type only)
6021 -- Has_Pragma_Pack (impl base type only)
6022 -- Has_Private_Ancestor
6023 -- Has_Private_Extension
6024 -- Has_Record_Rep_Clause (base type only)
6025 -- Has_Static_Discriminants (subtype only)
6026 -- Is_Class_Wide_Equivalent_Type
6027 -- Is_Concurrent_Record_Type
6028 -- Is_Constrained
6029 -- Is_Controlled_Active (base type only)
6030 -- $$$above in (plus type attributes)
6031 -- Is_Interface
6032 -- Is_Limited_Interface
6033 -- No_Reordering (base type only)
6034 -- Reverse_Bit_Order (base type only)
6035 -- Reverse_Storage_Order (base type only)
6036 -- SSO_Set_High_By_Default (base type only)
6037 -- SSO_Set_Low_By_Default (base type only)
6038 -- First_Component (synth)
6039 -- First_Component_Or_Discriminant (synth)
6040 -- (plus type attributes)
6042 -- E_Record_Type_With_Private
6043 -- E_Record_Subtype_With_Private
6044 -- Corresponding_Remote_Type $$$ E_Record_Subtype_With_Private
6045 -- Direct_Primitive_Operations
6046 -- First_Entity
6047 -- Private_Dependents
6048 -- Underlying_Full_View
6049 -- Last_Entity
6050 -- Discriminant_Constraint
6051 -- Stored_Constraint
6052 -- Interfaces
6053 -- Underlying_Record_View $$$ (base type only)
6054 -- Predicated_Parent (subtype only)
6055 -- Has_Completion
6056 -- Has_Private_Ancestor
6057 -- Has_Private_Extension
6058 -- Has_Record_Rep_Clause (base type only)
6059 -- Is_Concurrent_Record_Type
6060 -- Is_Constrained
6061 -- Is_Controlled_Active (base type only)
6062 -- $$$above in (plus type attributes)
6063 -- Is_Interface
6064 -- Is_Limited_Interface
6065 -- No_Reordering (base type only)
6066 -- Reverse_Bit_Order (base type only)
6067 -- Reverse_Storage_Order (base type only)
6068 -- SSO_Set_High_By_Default (base type only)
6069 -- SSO_Set_Low_By_Default (base type only)
6070 -- Corresponding_Remote_Type $$$ type
6071 -- First_Component (synth)
6072 -- First_Component_Or_Discriminant (synth)
6073 -- (plus type attributes)
6075 -- E_Return_Statement
6076 -- Return_Applies_To
6077 -- First_Entity $$$
6078 -- Last_Entity $$$
6080 -- E_Signed_Integer_Type
6081 -- E_Signed_Integer_Subtype
6082 -- Renamed_Object $$$ subtype
6083 -- Interface_Name $$$ subtype
6084 -- Direct_Primitive_Operations $$$ type
6085 -- First_Entity $$$
6086 -- Default_Aspect_Value (base type only)
6087 -- Scalar_Range
6088 -- Static_Discrete_Predicate
6089 -- Has_Biased_Representation
6090 -- Has_Shift_Operator (base type only)
6091 -- No_Predicate_On_Actual
6092 -- No_Dynamic_Predicate_On_Actual
6093 -- Type_Low_Bound (synth)
6094 -- Type_High_Bound (synth)
6095 -- (plus type attributes)
6097 -- E_String_Literal_Subtype
6098 -- String_Literal_Length
6099 -- First_Index (always Empty)
6100 -- String_Literal_Low_Bound
6101 -- Packed_Array_Impl_Type
6102 -- (plus type attributes)
6104 -- E_Subprogram_Body
6105 -- Mechanism
6106 -- First_Entity
6107 -- Corresponding_Protected_Entry
6108 -- Last_Entity
6109 -- Scope_Depth_Value
6110 -- Extra_Formals
6111 -- Anonymous_Masters
6112 -- Contract
6113 -- SPARK_Pragma
6114 -- Contains_Ignored_Ghost_Code
6115 -- SPARK_Pragma_Inherited
6116 -- Interface_Name $$$
6117 -- Renamed_Entity $$$
6118 -- Scope_Depth (synth)
6120 -- E_Subprogram_Type
6121 -- Extra_Accessibility_Of_Result
6122 -- Directly_Designated_Type
6123 -- Extra_Formals
6124 -- Access_Subprogram_Wrapper
6125 -- First_Formal (synth)
6126 -- First_Formal_With_Extras (synth)
6127 -- Last_Formal (synth)
6128 -- Number_Formals (synth)
6129 -- Returns_By_Ref
6130 -- First_Entity $$$
6131 -- Last_Entity $$$
6132 -- Interface_Name $$$
6133 -- (plus type attributes)
6135 -- E_Task_Body
6136 -- Contract
6137 -- SPARK_Pragma
6138 -- Ignore_SPARK_Mode_Pragmas
6139 -- SPARK_Pragma_Inherited
6140 -- First_Entity $$$
6141 -- (any others??? First/Last Entity, Scope_Depth???)
6143 -- E_Task_Type
6144 -- E_Task_Subtype
6145 -- Direct_Primitive_Operations
6146 -- First_Private_Entity
6147 -- First_Entity
6148 -- Corresponding_Record_Type
6149 -- Last_Entity
6150 -- Discriminant_Constraint
6151 -- Scope_Depth_Value
6152 -- Stored_Constraint
6153 -- Task_Body_Procedure
6154 -- Storage_Size_Variable (base type only)
6155 -- Relative_Deadline_Variable (base type only)
6156 -- Anonymous_Object
6157 -- Contract
6158 -- SPARK_Aux_Pragma
6159 -- Delay_Cleanups
6160 -- Has_Master_Entity
6161 -- Has_Storage_Size_Clause (base type only)
6162 -- Ignore_SPARK_Mode_Pragmas
6163 -- Is_Elaboration_Checks_OK_Id
6164 -- Is_Elaboration_Warnings_OK_Id
6165 -- SPARK_Aux_Pragma_Inherited
6166 -- First_Component (synth)
6167 -- First_Component_Or_Discriminant (synth)
6168 -- Has_Entries (synth)
6169 -- Is_Elaboration_Target (synth)
6170 -- Number_Entries (synth)
6171 -- Scope_Depth (synth)
6172 -- (plus type attributes)
6174 -- E_Variable
6175 -- Hiding_Loop_Variable
6176 -- Current_Value
6177 -- Part_Of_Constituents
6178 -- Part_Of_References
6179 -- Esize
6180 -- Extra_Accessibility
6181 -- Alignment
6182 -- Status_Flag_Or_Transient_Decl (transient object only)
6183 -- Unset_Reference
6184 -- Actual_Subtype
6185 -- Renamed_Object
6186 -- Renamed_Entity $$$
6187 -- Discriminal_Link $$$
6188 -- Size_Check_Code
6189 -- Prival_Link
6190 -- Interface_Name
6191 -- Shared_Var_Procs_Instance
6192 -- Extra_Constrained
6193 -- Related_Expression
6194 -- Debug_Renaming_Link
6195 -- Last_Assignment
6196 -- Related_Type
6197 -- Initialization_Statements
6198 -- BIP_Initialization_Call
6199 -- Last_Aggregate_Assignment
6200 -- Activation_Record_Component
6201 -- Encapsulating_State
6202 -- Linker_Section_Pragma
6203 -- Contract
6204 -- Anonymous_Designated_Type
6205 -- Validated_Object
6206 -- SPARK_Pragma
6207 -- Has_Alignment_Clause
6208 -- Has_Atomic_Components
6209 -- Has_Biased_Representation
6210 -- Has_Independent_Components
6211 -- Has_Initial_Value
6212 -- Has_Size_Clause
6213 -- Has_Volatile_Components
6214 -- Is_Atomic
6215 -- Is_Elaboration_Checks_OK_Id
6216 -- Is_Elaboration_Warnings_OK_Id
6217 -- Is_Eliminated
6218 -- Is_Finalized_Transient
6219 -- Is_Ignored_Transient
6220 -- Is_Independent
6221 -- Is_Return_Object
6222 -- Is_Safe_To_Reevaluate
6223 -- Is_Shared_Passive
6224 -- Is_True_Constant
6225 -- Is_Uplevel_Referenced_Entity
6226 -- Is_Volatile
6227 -- Is_Volatile_Full_Access
6228 -- OK_To_Rename
6229 -- Optimize_Alignment_Space
6230 -- Optimize_Alignment_Time
6231 -- SPARK_Pragma_Inherited
6232 -- Suppress_Initialization
6233 -- Treat_As_Volatile
6234 -- Address_Clause (synth)
6235 -- Alignment_Clause (synth)
6236 -- Is_Elaboration_Target (synth)
6237 -- Is_Full_Access (synth)
6238 -- Size_Clause (synth)
6240 -- E_Void
6241 -- Since E_Void is the initial Ekind value of an entity when it is first
6242 -- created, one might expect that no attributes would be defined on such
6243 -- an entity until its Ekind field is set. However, in practice, there
6244 -- are many instances in which fields of an E_Void entity are set in the
6245 -- code prior to setting the Ekind field. This is not well documented or
6246 -- well controlled, and needs cleaning up later. Meanwhile, the access
6247 -- procedures in the body of Einfo permit many, but not all, attributes
6248 -- to be applied to an E_Void entity, precisely so that this kind of
6249 -- pre-setting of attributes works. This is really a hole in the dynamic
6250 -- type checking, since there is no assurance that the eventual Ekind
6251 -- value will be appropriate for the attributes set, and the consequence
6252 -- is that the dynamic type checking in the Einfo body is unnecessarily
6253 -- weak.
6255 -- The following are examples of getters and setters called with E_Void:
6256 -- Entry_Formal $$$
6257 -- Esize $$$
6258 -- First_Entity $$$
6259 -- Handler_Records $$$
6260 -- Interface_Name $$$
6261 -- Last_Entity $$$
6262 -- Renamed_Entity $$$
6263 -- Renamed_Object $$$
6264 -- Scalar_Range $$$
6265 -- Set_Associated_Node_For_Itype $$$
6266 -- Set_Debug_Renaming_Link $$$
6267 -- Set_Entry_Cancel_Parameter $$$
6268 -- Set_First_Entity $$$
6269 -- Set_Inner_Instances $$$
6270 -- Set_Last_Entity $$$
6271 -- Set_Scalar_Range $$$
6272 -- Set_Entry_Cancel_Parameter $$$
6274 ---------------
6275 -- Iterators --
6276 ---------------
6278 -- In addition to attributes that are stored as plain data, other
6279 -- attributes are procedural, and require some small amount of
6280 -- computation. Of course, from the point of view of a user of this
6281 -- package, the distinction is not visible (even the field information
6282 -- provided below should be disregarded, as it is subject to change
6283 -- without notice). A number of attributes appear as lists: lists of
6284 -- formals, lists of actuals, of discriminants, etc. For these, pairs
6285 -- of functions are defined, which take the form:
6287 -- function First_Thing (E : Enclosing_Construct) return Thing;
6288 -- function Next_Thing (T : Thing) return Thing;
6290 -- The end of iteration is always signaled by a value of Empty, so that
6291 -- loops over these chains invariably have the form:
6293 -- This : Thing;
6294 -- ...
6295 -- This := First_Thing (E);
6297 -- while Present (This) loop
6298 -- Do_Something_With (This);
6299 -- ...
6300 -- This := Next_Thing (This);
6301 -- end loop;
6303 -----------------------------------
6304 -- Handling of Check Suppression --
6305 -----------------------------------
6307 -- There are three ways that checks can be suppressed:
6309 -- 1. At the command line level
6310 -- 2. At the scope level.
6311 -- 3. At the entity level.
6313 -- See spec of Sem in sem.ads for details of the data structures used
6314 -- to keep track of these various methods for suppressing checks.
6316 -------------------------------
6317 -- Handling of Discriminants --
6318 -------------------------------
6320 -- During semantic processing, discriminants are separate entities which
6321 -- reflect the semantic properties and allowed usage of discriminants in
6322 -- the language.
6324 -- In the case of discriminants used as bounds, the references are handled
6325 -- directly, since special processing is needed in any case. However, there
6326 -- are two circumstances in which discriminants are referenced in a quite
6327 -- general manner, like any other variables:
6329 -- In initialization expressions for records. Note that the expressions
6330 -- used in Priority, Storage_Size, Task_Info and Relative_Deadline
6331 -- pragmas are effectively in this category, since these pragmas are
6332 -- converted to initialized record fields in the Corresponding_Record_
6333 -- Type.
6335 -- In task and protected bodies, where the discriminant values may be
6336 -- referenced freely within these bodies. Discriminants can also appear
6337 -- in bounds of entry families and in defaults of operations.
6339 -- In both these cases, the discriminants must be treated essentially as
6340 -- objects. The following approach is used to simplify and minimize the
6341 -- special processing that is required.
6343 -- When a record type with discriminants is analyzed, semantic processing
6344 -- creates the entities for the discriminants. It also creates additional
6345 -- sets of entities called discriminals, one for each of the discriminants,
6346 -- and the Discriminal field of the discriminant entity points to this
6347 -- additional entity, which is initially created as an uninitialized
6348 -- (E_Void) entity.
6350 -- During expansion of expressions, any discriminant reference is replaced
6351 -- by a reference to the corresponding discriminal. When the initialization
6352 -- procedure for the record is created (there will always be one, since
6353 -- discriminants are present, see Exp_Ch3 for further details), the
6354 -- discriminals are used as the entities for the formal parameters of
6355 -- this initialization procedure. The references to these discriminants
6356 -- have already been replaced by references to these discriminals, which
6357 -- are now the formal parameters corresponding to the required objects.
6359 -- In the case of a task or protected body, the semantics similarly creates
6360 -- a set of discriminals for the discriminants of the task or protected
6361 -- type. When the procedure is created for the task body, the parameter
6362 -- passed in is a reference to the task value type, which contains the
6363 -- required discriminant values. The expander creates a set of declarations
6364 -- of the form:
6366 -- discr_nameD : constant discr_type renames _task.discr_name;
6368 -- where discr_nameD is the discriminal entity referenced by the task
6369 -- discriminant, and _task is the task value passed in as the parameter.
6370 -- Again, any references to discriminants in the task body have been
6371 -- replaced by the discriminal reference, which is now an object that
6372 -- contains the required value.
6374 -- This approach for tasks means that two sets of discriminals are needed
6375 -- for a task type, one for the initialization procedure, and one for the
6376 -- task body. This works out nicely, since the semantics allocates one set
6377 -- for the task itself, and one set for the corresponding record.
6379 -- The one bit of trickiness arises in making sure that the right set of
6380 -- discriminals is used at the right time. First the task definition is
6381 -- processed. Any references to discriminants here are replaced by the
6382 -- corresponding *task* discriminals (the record type doesn't even exist
6383 -- yet, since it is constructed as part of the expansion of the task
6384 -- declaration, which happens after the semantic processing of the task
6385 -- definition). The discriminants to be used for the corresponding record
6386 -- are created at the same time as the other discriminals, and held in the
6387 -- CR_Discriminant field of the discriminant. A use of the discriminant in
6388 -- a bound for an entry family is replaced with the CR_Discriminant because
6389 -- it controls the bound of the entry queue array which is a component of
6390 -- the corresponding record.
6392 -- Just before the record initialization routine is constructed, the
6393 -- expander exchanges the task and record discriminals. This has two
6394 -- effects. First the generation of the record initialization routine
6395 -- uses the discriminals that are now on the record, which is the set
6396 -- that used to be on the task, which is what we want.
6398 -- Second, a new set of (so far unused) discriminals is now on the task
6399 -- discriminants, and it is this set that will be used for expanding the
6400 -- task body, and also for the discriminal declarations at the start of
6401 -- the task body.
6403 ---------------------------------------------------
6404 -- Handling of private data in protected objects --
6405 ---------------------------------------------------
6407 -- Private components in protected types pose problems similar to those
6408 -- of discriminants. Private data is visible and can be directly referenced
6409 -- from protected bodies. However, when protected entries and subprograms
6410 -- are expanded into corresponding bodies and barrier functions, private
6411 -- components lose their original context and visibility.
6413 -- To remedy this side effect of expansion, private components are expanded
6414 -- into renamings called "privals", by analogy with "discriminals".
6416 -- private_comp : comp_type renames _object.private_comp;
6418 -- Prival declarations are inserted during the analysis of subprogram and
6419 -- entry bodies to ensure proper visibility for any subsequent expansion.
6420 -- _Object is the formal parameter of the generated corresponding body or
6421 -- a local renaming which denotes the protected object obtained from entry
6422 -- parameter _O. Privals receive minimal decoration upon creation and are
6423 -- categorized as either E_Variable for the general case or E_Constant when
6424 -- they appear in functions.
6426 -- Along with the local declarations, each private component carries a
6427 -- placeholder which references the prival entity in the current body. This
6428 -- form of indirection is used to resolve name clashes of privals and other
6429 -- locally visible entities such as parameters, local objects, entry family
6430 -- indexes or identifiers used in the barrier condition.
6432 -- When analyzing the statements of a protected subprogram or entry, any
6433 -- reference to a private component must resolve to the locally declared
6434 -- prival through normal visibility. In case of name conflicts (the cases
6435 -- above), the prival is marked as hidden and acts as a weakly declared
6436 -- entity. As a result, the reference points to the correct entity. When a
6437 -- private component is denoted by an expanded name (prot_type.comp for
6438 -- example), the expansion mechanism uses the placeholder of the component
6439 -- to correct the Entity and Etype of the reference.
6441 end Einfo;