end if;
end Append_Freeze_Actions;
- --------------------------------------
- -- Attr_Constrained_Statically_True --
- --------------------------------------
+ ----------------------------------------
+ -- Attribute_Constrained_Static_Value --
+ ----------------------------------------
function Attribute_Constrained_Static_Value (Pref : Node_Id) return Boolean
is
if Is_Entity_Name (Pref) then
declare
- Ent : constant Entity_Id := Entity (Pref);
+ Ent : constant Entity_Id := Entity (Pref);
Res : Boolean;
begin
-- we will do the folding right here (things get confused if we let this
-- case go through the normal circuitry).
- if Attribute_Name (N) = Name_Img
+ if Id = Attribute_Img
and then Is_Entity_Name (P)
and then Is_Enumeration_Type (Etype (Entity (P)))
and then Is_OK_Static_Expression (P)
-- T'Descriptor_Size is never static, even if T is static.
if Is_Scalar_Type (P_Entity)
- and then (not Is_Generic_Type (P_Entity))
+ and then not Is_Generic_Type (P_Entity)
and then Is_Static_Subtype (P_Entity)
and then Is_Scalar_Type (Etype (N))
and then
if Is_Type (P_Entity)
and then (Is_Scalar_Type (P_Entity) or Is_Array_Type (P_Entity))
- and then (not Is_Generic_Type (P_Entity))
+ and then not Is_Generic_Type (P_Entity)
then
P_Type := P_Entity;
elsif Ekind (P_Entity) in E_Variable | E_Constant
and then Is_Array_Type (Etype (P_Entity))
- and then (not Is_Generic_Type (Etype (P_Entity)))
+ and then not Is_Generic_Type (Etype (P_Entity))
then
P_Type := Etype (P_Entity);
elsif (Id = Attribute_Size or
Id = Attribute_Max_Size_In_Storage_Elements)
and then Is_Type (P_Entity)
- and then (not Is_Generic_Type (P_Entity))
+ and then not Is_Generic_Type (P_Entity)
and then Known_Static_RM_Size (P_Entity)
then
declare
elsif Id = Attribute_Alignment
and then Is_Type (P_Entity)
- and then (not Is_Generic_Type (P_Entity))
+ and then not Is_Generic_Type (P_Entity)
and then Known_Alignment (P_Entity)
then
Compile_Time_Known_Attribute (N, Alignment (P_Entity));
-- If this is an access attribute that is known to fail accessibility
-- check, rewrite accordingly.
- elsif Attribute_Name (N) = Name_Access
+ elsif Id = Attribute_Address
and then Raises_Constraint_Error (N)
then
Rewrite (N,